[Python-Dev] Compiler warnings (original) (raw)
Tim Peters tim.peters at gmail.com
Wed Feb 1 02:16:21 CET 2006
- Previous message: [Python-Dev] Extension to ConfigParser
- Next message: [Python-Dev] Compiler warnings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Thomas Wouters]
I noticed a few compiler warnings, when I compile Python on my amd64 with gcc 4.0.3:
Objects/longobject.c: In function 'PyLongAsDouble': Objects/longobject.c:655: warning: 'e' may be used uninitialized in this function
Well, that's pretty bizarre. There's obviously no way to get to a
reference to e
without going through
x = _PyLong_AsScaledDouble(vv, &e);
first. That isn't a useful warning.
Objects/longobject.c: In function 'longtruedivide': Objects/longobject.c:2263: warning: 'aexp' may be used uninitialized in this function Objects/longobject.c:2263: warning: 'bexp' may be used uninitialized in this function
Same thing, really, complaining about vrbls whose values are always set by _PyLong_AsScaledDouble().
Modules/linuxaudiodev.c: In function 'ladobuffree': Modules/linuxaudiodev.c:392: warning: 'ssize' may be used uninitialized in this function Modules/linuxaudiodev.c: In function 'ladbufsize': Modules/linuxaudiodev.c:348: warning: 'ssize' may be used uninitialized in this function Modules/linuxaudiodev.c: In function 'ladobufcount': Modules/linuxaudiodev.c:369: warning: 'ssize' may be used uninitialized in this function
Those are Linux bugs ;-)
... Should these warnings be fixed?
I don't know. Is this version of gcc broken in some way relative to other gcc versions, or newer, or ... ? We certainly don't want to see warnings under gcc, since it's heavily used, but I'm not clear on why other versions of gcc aren't producing these warnings (or are they, and people have been ignoring that?).
I know Tim has always argued to fix them, in the past (and I agree,) and it doesn't look like doing so, by initializing the variables, wouldn't be too big a performance hit.
We shouldn't see any warnings under a healthy gcc.
I also noticed testlogging is spuriously failing, and not just on my machine (according to buildbot logs.) Is anyone (Vinay?) looking at that yet?
FWIW, I've never seen this fail on Windows. The difference is probably that sockets on Windows work .
- Previous message: [Python-Dev] Extension to ConfigParser
- Next message: [Python-Dev] Compiler warnings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]