https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79106

--- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> ---
That's right.  I believe printing the contents of the translation unit and not
even opening the files referenced by the #line directives in it like Clang does
is the expected and correct behavior.  Not just to avoid printing the contents
of unrelated files but to print the contents at all.  When the local header
referenced from the translation unit isn't a close match to what is in the TU
GCC won't print any context in the diagnostics.  I don't know what all it
considers to decide.

I'm not at all familiar with the GCC preprocessor implementation so I have no
idea how feasible it is to change it to behave that way.

Reply via email to