This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/22428] __extension__ won't silence pedwarns about hex float constants
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2005 12:04:02 -0000
- Subject: [Bug preprocessor/22428] __extension__ won't silence pedwarns about hex float constants
- References: <20050712055309.22428.bje@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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