c-ppoutput.c (cb_line_change): Revert 2003-08-04's change.
authorAlexandre Oliva <aoliva@redhat.com>
Sun, 14 Sep 2003 13:56:18 +0000 (13:56 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Sun, 14 Sep 2003 13:56:18 +0000 (13:56 +0000)
* c-ppoutput.c (cb_line_change): Revert 2003-08-04's change.
* c-lex.c (cb_line_change): Skip line changing whenever
c-ppoutput.c would.

From-SVN: r71381

gcc/ChangeLog
gcc/c-lex.c
gcc/c-ppoutput.c

index 903db9b2f3fd16695609393b73a8e3e7d8c38360..d0e68ae82f032579940aa5c559e67b7781ca3ad3 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-14  Alexandre Oliva  <aoliva@redhat.com>
+
+       * c-ppoutput.c (cb_line_change): Revert 2003-08-04's change.
+       * c-lex.c (cb_line_change): Skip line changing whenever
+       c-ppoutput.c would.
+
 2003-09-14  Steven Bosscher  <steven@gcc.gnu.org>
 
        * ra.c: Convert to ISO C90 prototypes.
index c9c69a68be09429dd0067b6b566a9dae05e429aa..2109eff1da93e5ac9230946914625c8e37542838 100644 (file)
@@ -197,8 +197,11 @@ cb_ident (cpp_reader *pfile ATTRIBUTE_UNUSED,
    lexed token on the line.  Used for diagnostic line numbers.  */
 static void
 cb_line_change (cpp_reader *pfile ATTRIBUTE_UNUSED, const cpp_token *token,
-               int parsing_args ATTRIBUTE_UNUSED)
+               int parsing_args)
 {
+  if (token->type == CPP_EOF || parsing_args)
+    return;
+
   src_lineno = SOURCE_LINE (map, token->line);
 }
 
index 68b45d2f517de4f8c37ad88758f96f03dd36218d..9642f306cace866b421c3ea9e338b7df785521c8 100644 (file)
@@ -261,9 +261,9 @@ print_line (const struct line_map *map, unsigned int line, const char *special_f
    of the line, and at end of file will be CPP_EOF.  */
 static void
 cb_line_change (cpp_reader *pfile, const cpp_token *token,
-               int parsing_args ATTRIBUTE_UNUSED)
+               int parsing_args)
 {
-  if (token->type == CPP_EOF)
+  if (token->type == CPP_EOF || parsing_args)
     return;
 
   maybe_print_line (print.map, token->line);