summaryrefslogtreecommitdiff
path: root/gcc/c-lex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r--gcc/c-lex.c5
1 files changed, 4 insertions, 1 deletions
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);
}