This is the mail archive of the
mailing list for the GCC project.
Re: #pragma interface/implementation broken if--enable-mapped-location
"Joseph S. Myers" <email@example.com> writes:
> That should work (with the warning from -Wunknown-pragmas being given at
> the point an unknown pragma is thrown away). For now yylex for C could
> handle that pragma token by calling the handler immediately (so the
> subsequent tokens never reach the parser). With the possibility of then
> checking for particular pragmas and passing the token sequence on to the
> parser for those cases only.
> I'd add that the CPP_PRAGMA token, though referred to as __pragma,
> shouldn't actually be spellable that way in source code; the only way to
> get one in the token stream should be #pragma / _Pragma (and perhaps the
> diagnostic messages complaining of such pragmas in bad places for the
> grammar should use the spelling "#pragma" rather than "PRAGMA").
Right. When -E is in effect, we'll continue to emit pragmas in
preprocessing-directive notation, as is done now. I've already got a
bug assigned to me to improve the diagnostics.