isfinite() failure on Cygwin with gcc 3.4.1
Jeff Johnston
jjohnstn@redhat.com
Mon Feb 7 21:06:00 GMT 2005
A fix has been checked in to avoid using the same input variable names for these
macros which nest.
-- Jeff J.
William M. (Mike) Miller wrote:
> Andrew Pinski wrote:
>
>> Lets look at the definition of the macros again:
>>
>>
>>> #define fpclassify(x) \
>>> (__extension__ ({__typeof__(x) __x = (x); \
>>> (sizeof (__x) == sizeof (float)) ?
>>> __fpclassifyf(__x) : __fpclassifyd(__x);}))
>>>
>>> #define isfinite(x) \
>>> (__extension__ ({__typeof__(x) __x = (x); \
>>> fpclassify(__x) != FP_INFINITE &&
>>> fpclassify(__x) != FP_NAN;}))
>>
>>
>>
>> See how we pass __x to fpclassify, well when we preprocessed the
>> source we get in there:
>> __typeof__(x) __x = (__x); which just makes this uninitialized. The
>> reason why we
>> don't warn about it in gcc is because int a = a; is documented to have
>> the uninitilizated
>> warnings to go away.
>>
>> Thanks,
>> Andrew Pinski
>> a gcc developer and a gcc bug master
>
>
> Aha, mystery solved! (*smacking forehead*) I should have noticed that
> -- would have made for a shorter bug report. Thanks for looking into it.
>
More information about the Newlib
mailing list