aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 41e8a00..efb5c06 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -767,6 +767,12 @@ _cpp_lex_direct (pfile)
if (!_cpp_get_fresh_line (pfile))
{
result->type = CPP_EOF;
+ if (!pfile->state.in_directive)
+ {
+ /* Tell the compiler the line number of the EOF token. */
+ result->line = pfile->line;
+ result->flags = BOL;
+ }
return result;
}
if (!pfile->keep_tokens)