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

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
FWIW the following hackish workaround seems to fix it, though am still
investigating why this is happening.

diff --git a/libcpp/directives.c b/libcpp/directives.c
index f4aa17d1156..b5bdd443a5a 100644
--- a/libcpp/directives.c
+++ b/libcpp/directives.c
@@ -850,6 +850,9 @@ do_include_common (cpp_reader *pfile, enum include_type
type)
                           pfile->directive->name, fname, angle_brackets,
                           buf);

+      if (CPP_OPTION (pfile, traditional))
+       location = pfile->directive_line;
+
       _cpp_stack_include (pfile, fname, angle_brackets, type, location);
     }

Reply via email to