This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/7263] __extension__ keyword doesn't suppress warning on LL or ULL constants
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2008 19:50:20 -0000
- Subject: [Bug preprocessor/7263] __extension__ keyword doesn't suppress warning on LL or ULL constants
- References: <bug-7263-1664@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #18 from manu at gcc dot gnu dot org 2008-08-19 19:50 -------
(In reply to comment #17)
> Maybe libcpp could have a mode where it also recognizes the __extension__
> token?
It would definitely need to recognize __extension__. But it doesn't seem easy
to implement this. If we make it apply just to the next token, we would need to
reset it just after lexing the token after the next.
For example, the C front-end asks CPP for next token. It is __extension__ so
CPP disables pedantic and returns it to the front-end. C front-end asks for
another token. It is 0x1b27da572ef3cd86ULL. We cannot reset pedantic here
because after getting the token, the C front-end may call CPP for further
analysis (e.g., cpp_classify_number). We would have to wait for the front-end
to ask for yet another token and then reset pedantic.
Should the diagnostics in cpp_classify_number really be given by CPP? If so,
why cpp_classify_number is not called by CPP itself?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7263