------- Comment #10 from tromey at gcc dot gnu dot org 2008-04-22 15:24 ------- I think this should be fixable now that mapped locations have gone in. The key is to have c_lex_with_flags return a value for in_system_header which comes from the token's "original" location, not the macro expansion location. I am not sure if this will do the right thing with token pasting. And, it probably will not work for something like:
/* system */ #define F(x) x /* user */ F(somethingToCauseAWarning) It isn't clear to me whether we would want the warning here or not. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=7263