aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2003-04-20 11:57:38 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2003-04-20 11:57:38 +0000
commit299f79b5a0748924f00ea910999fc4b7fcc64f3b (patch)
tree6df1380397d5413a13bae6c8718beff0cc10f10f /gcc/cpplex.c
parentde0c0e694f430d942db00e60e6218d9e1715f119 (diff)
downloadgcc-299f79b5a0748924f00ea910999fc4b7fcc64f3b.zip
gcc-299f79b5a0748924f00ea910999fc4b7fcc64f3b.tar.gz
gcc-299f79b5a0748924f00ea910999fc4b7fcc64f3b.tar.bz2
cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens.
.: * cpplex.c (_cpp_lex_direct): Set BOL for CPP_EOF tokens. * gcov.c (output_lines): Don't be so fussy about going past EOF. cp: * cp/decl2.c (start_static_storage_duration_function): Take count arg, don't check if it wraps round. (generate_ctor_or_dtor_function): Add locus arg, use it. (generate_ctor_and_dtor_functions_for_priority): Data arg is a locus. (finish_file): Set line numbers to past EOF for synthesized functions. From-SVN: r65847
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)