public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/22428] New: __extension__ won't silence pedwarns about hex float constants
@ 2005-07-12 5:56 bje at gcc dot gnu dot org
2005-07-12 5:57 ` [Bug preprocessor/22428] " pinskia at gcc dot gnu dot org
2005-07-12 12:10 ` joseph at codesourcery dot com
0 siblings, 2 replies; 3+ messages in thread
From: bje at gcc dot gnu dot org @ 2005-07-12 5:56 UTC (permalink / raw)
To: gcc-bugs
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.
--
Summary: __extension__ won't silence pedwarns about hex float
constants
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bje at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22428
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/22428] __extension__ won't silence pedwarns about hex float constants
2005-07-12 5:56 [Bug preprocessor/22428] New: __extension__ won't silence pedwarns about hex float constants bje at gcc dot gnu dot org
@ 2005-07-12 5:57 ` pinskia at gcc dot gnu dot org
2005-07-12 12:10 ` joseph at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-12 5:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-12 05:56 -------
*** This bug has been marked as a duplicate of 11931 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22428
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/22428] __extension__ won't silence pedwarns about hex float constants
2005-07-12 5:56 [Bug preprocessor/22428] New: __extension__ won't silence pedwarns about hex float constants bje at gcc dot gnu dot org
2005-07-12 5:57 ` [Bug preprocessor/22428] " pinskia at gcc dot gnu dot org
@ 2005-07-12 12:10 ` joseph at codesourcery dot com
1 sibling, 0 replies; 3+ messages in thread
From: joseph at codesourcery dot com @ 2005-07-12 12:10 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-12 12:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-12 5:56 [Bug preprocessor/22428] New: __extension__ won't silence pedwarns about hex float constants bje at gcc dot gnu dot org
2005-07-12 5:57 ` [Bug preprocessor/22428] " pinskia at gcc dot gnu dot org
2005-07-12 12:10 ` joseph at codesourcery dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).