PR cpp/7263 pragma system_header doesn't suppress warning on LL or ULL constants

Tom Tromey tromey@redhat.com
Wed Aug 13 20:07:00 GMT 2008


>>>>> "Manuel" == Manuel López-Ibáñez <lopezibanez@gmail.com> writes:

Manuel> One for the real location of the problem (the macro
Manuel> definition) and another for the place where the macro was
Manuel> instantiated. Then we can use those locations to check
Manuel> cpp_inhibit_warnings_at from within cpp_error.

Ideally I'd like to encode macro expansion history in a
source_location.  This is more like a dream than a plan, though, since
I have not tried to figure out exactly how to implement this encoding,
or whether it can be done inexpensively enough.

If we had this then I think we could do the checking in the diagnostic
functions, like you want.  Well, more or less... there are questions
in weird cases, where some bits of an expression come from a system
header and some do not.  (These may be rare enough that we don't have
to work much.)

Failing implementation of the full dream perhaps we can keep just two
locations -- one for the start of the top-level macro expansion and
one for the original location of the token.  This information is
already available to libcpp users -- just not really inside libcpp
itself.  This is a bizarre consequence of a hack needed to get mapped
locations working well enough to enable.

Tom



More information about the Gcc-patches mailing list