This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: isfinite() failure on Cygwin with gcc 3.4.1


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]