This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/79106] wrong source line printed in diagnostics for a translation unit


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]