Issue 15181: importlib.h: suncc warnings (original) (raw)

Created on 2012-06-25 12:00 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (6)
msg163954 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 12:00
suncc complains about negative values that are assigned to unsigned char: "Python/importlib.h", line 3634: warning: initializer does not fit or is out of range: -125 "Python/importlib.h", line 3635: warning: initializer does not fit or is out of range: -125 [...]
msg163984 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-06-25 15:36
New changeset 6dc9472346de by Antoine Pitrou in branch 'default': Issue #15181: importlib bytecode is unsigned and shouldn't have negative numbers. http://hg.python.org/cpython/rev/6dc9472346de
msg163985 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-25 15:36
It should be fixed now!
msg163987 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 15:47
+ fprintf(outfile, "%d,", (unsigned int) data[i]); Hmm, "%u"? :)
msg163988 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-06-25 15:49
Le lundi 25 juin 2012 à 15:47 +0000, Stefan Krah a écrit : > > + fprintf(outfile, "%d,", (unsigned int) data[i]); > > Hmm, "%u"? :) It doesn't change anything, since data[i] is between 0 and 255. (unless C `int` is 8 bits on your computer, but I doubt it :-))
msg163989 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2012-06-25 15:53
Antoine Pitrou <report@bugs.python.org> wrote: > > + fprintf(outfile, "%d,", (unsigned int) data[i]); > > > > Hmm, "%u"? :) > > It doesn't change anything, since data[i] is between 0 and 255. > (unless C `int` is 8 bits on your computer, but I doubt it :-)) That's true, but we might get another compiler warning about that. No big deal of course.
History
Date User Action Args
2022-04-11 14:57:32 admin set github: 59386
2012-06-25 15:53:02 skrah set messages: +
2012-06-25 15:49:09 pitrou set messages: +
2012-06-25 15:47:22 skrah set messages: +
2012-06-25 15:36:54 pitrou set status: open -> closednosy: + pitroumessages: + resolution: fixedstage: resolved
2012-06-25 15:36:27 python-dev set nosy: + python-devmessages: +
2012-06-25 12:00:25 skrah create