This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: builtin float.h macros


Joseph S. Myers wrote:-

> On Tue, 3 Sep 2002, Neil Booth wrote:
> 
> > float.h is a system header even though provided by GCC, right?  If so,
> > then a simple "cpp_sys_macro_p (pfile)" in the right place in the warning
> > check in cppexp.c should do it.
> 
> We need something like this for pedwarns when converting a preprocessing
> token to a token anyway, to deal with the issue that the expansion of
> _Complex_I in glibc's <complex.h> now generates a pedwarn (the warning
> having moved to cpplib, so it's no longer affected by __extension__).  
> That doesn't help with the differences in what's a preprocessing token,
> though you could devise some way to say (when defining these macros
> internally to the compiler) "the expansion of this macro is to be treated
> as a single token, even though in the current mode it wouldn't be treated
> as one".

I think we need to be careful using this "is it a system macro" get-out.
It might not reasonably work for anything other than an expansion at
file-level (i.e. not nested) when I make these simplifications to cpplib
I have in mind related to pre-expansion of token lines.  The whole
concept is quite intimately bound with the current expansion algorithm.

It might be done by flagging every token of a system macro's expansion
as being "special", but that rapidly gets expensive.

Neil.


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