c-lex.c (cb_file_change): Pass the #inclusion's line number to the start_source_file...
authorJim Blandy <jimb@redhat.com>
Wed, 20 Mar 2002 05:06:51 +0000 (05:06 +0000)
committerJim Blandy <jimb@gcc.gnu.org>
Wed, 20 Mar 2002 05:06:51 +0000 (05:06 +0000)
* c-lex.c (cb_file_change): Pass the #inclusion's line number to
the start_source_file debug hook, not the current line number.

From-SVN: r51064

gcc/ChangeLog
gcc/c-lex.c

index 9f9cdde..82f99cd 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-19  Jim Blandy  <jimb@redhat.com>
+
+       * c-lex.c (cb_file_change): Pass the #inclusion's line number to
+       the start_source_file debug hook, not the current line number.
+
 2002-03-19  Richard Henderson  <rth@redhat.com>
 
        * flow.c (EH_USES): Provide default.
index 7bafde7..cf5141b 100644 (file)
@@ -273,10 +273,12 @@ cb_file_change (pfile, new_map)
        main_input_filename = new_map->to_file;
       else
        {
-         lineno = SOURCE_LINE (new_map - 1, new_map->from_line - 1);
+          int included_at = SOURCE_LINE (new_map - 1, new_map->from_line - 1);
+
+         lineno = included_at;
          push_srcloc (new_map->to_file, 1);
          input_file_stack->indent_level = indent_level;
-         (*debug_hooks->start_source_file) (lineno, new_map->to_file);
+         (*debug_hooks->start_source_file) (included_at, new_map->to_file);
 #ifndef NO_IMPLICIT_EXTERN_C
          if (c_header_level)
            ++c_header_level;