Hi,

in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48778 Manuel
López-Ibáñez mentioned that starting with gcc 4.7 there is supposed to
be infrastructure to figure out for diagnostics whether the location
of an error was created by macro expansion and that this can be used
to disable a warning in that case.

Can anyone point me to the name of a function/macro I should use to
check that or another example in the code that already does this?

I mean I can see how maybe_unwind_expanded_macro_loc figures out
whether it needs to unwind macro expansions but I am not sure whether
this linemap_lookup/linemap_macro_expansion_map_p stuff is what I am
supposed to use in the place where I check for the diagnostics to emit
or whether there is a higher level abstraction of this functionality.

Additionally I found that the mentioned
linemap_lookup/linemap_macro_expansion_map_p stuff seems to produce
useful information on the gcc 4.8 branch with the example from the bug
report but not on the gcc 4.7 branch. On the latter I actually don't
get the macro unwinding information. Thus it seems that this is not
the infrastructure Manuel was refering to.

Robert

Reply via email to