Tim Peters <[EMAIL PROTECTED]> wrote:

> [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 'PyLong_AsDouble':
>> 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.

This has been discussed many times on the GCC mailing list. Ultimately,
detecting whether a variable is using initialized or not (given full
interprocedural and whole-program compilation) is a problem that can be
reduced to the halting problem. The only thing that GCC should (and will) do
is finding a way to be consistent across different releases and optimization
levels, and to produce an useful number of warnings, while not issuing too
many false positives.
-- 
Giovanni Bajo

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to