------- Additional Comments From joseph at codesourcery dot com  2005-07-12 
12:04 -------
Subject: Re:  New: __extension__ won't silence pedwarns
 about hex float constants

On Tue, 12 Jul 2005, bje at gcc dot gnu dot org wrote:

> The __extension__ keyword does not silence pedwarns about hexadecimal floating
> point constants.  This is used by GNU libc, for example in the definition of
> INFINITY:
> 
> #  define HUGE_VALF (__extension__ 0x1.0p255f)
> #  define HUGE_VALL (__extension__ 0x1.0p32767L)
> 
> These macros produce warnings that cannot be silenced.  This appears not to 
> work
> because the pedwarn is generated by the preprocessor.

My preference for this (bug 7263 / 11931) would be disabling it for the 
expansion of macros defined in system headers rather than making the 
preprocessor aware of __extension__.

current-ish glibc uses #if __GNUC_PREREQ(3,3)
# define HUGE_VAL       (__builtin_huge_val())

and similar which avoid this problem (but not the corresponding one for 
_Complex_I).



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22428

Reply via email to