From 652b3139b887957087721b384b59b86e662b0a5c Mon Sep 17 00:00:00 2001 From: aoliva Date: Sun, 14 Sep 2003 13:56:18 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71381 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/c-lex.c | 5 ++++- gcc/c-ppoutput.c | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 903db9b2f3f..d0e68ae82f0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2003-09-14 Alexandre Oliva + + * 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 * ra.c: Convert to ISO C90 prototypes. diff --git a/gcc/c-lex.c b/gcc/c-lex.c index c9c69a68be0..2109eff1da9 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -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); } diff --git a/gcc/c-ppoutput.c b/gcc/c-ppoutput.c index 68b45d2f517..9642f306cac 100644 --- a/gcc/c-ppoutput.c +++ b/gcc/c-ppoutput.c @@ -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); -- 2.11.4.GIT