aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplex.c
diff options
context:
space:
mode:
authorNeil Booth <neilb@earthling.net>2000-09-19 21:41:26 +0000
committerNeil Booth <neil@gcc.gnu.org>2000-09-19 21:41:26 +0000
commit7eea5554ce33c1031a635d538695de0de1e5d97b (patch)
treed0d0c442763c0e8b486994a7f2b3e1ea577052bf /gcc/cpplex.c
parentc2f099e7fa6789eacddac3f8755447479db828d5 (diff)
downloadgcc-7eea5554ce33c1031a635d538695de0de1e5d97b.zip
gcc-7eea5554ce33c1031a635d538695de0de1e5d97b.tar.gz
gcc-7eea5554ce33c1031a635d538695de0de1e5d97b.tar.bz2
cpplex.c (lex_line): Drop the EOF token for unknown directives in assembler.
* cpplex.c (lex_line): Drop the EOF token for unknown directives in assembler. From-SVN: r36545
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r--gcc/cpplex.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c
index 4e321b6..c0bf875 100644
--- a/gcc/cpplex.c
+++ b/gcc/cpplex.c
@@ -1669,11 +1669,6 @@ lex_line (pfile, list)
first->flags |= BOL;
pfile->first_directive_token = first;
- /* Drop the EOF unless really at EOF or in a directive. */
- if (!(cur_token == first || pfile->state.in_directive
- || !pfile->done_initializing))
- list->tokens_used--;
-
/* Don't complain about the null directive, nor directives in
assembly source: we don't know where the comments are, and # may
introduce assembler pseudo-ops. Don't complain about invalid
@@ -1697,6 +1692,11 @@ lex_line (pfile, list)
goto retry;
}
+ /* Drop the EOF unless really at EOF or in a directive. */
+ if (cur_token != first && !KNOWN_DIRECTIVE (list)
+ && pfile->done_initializing)
+ list->tokens_used--;
+
pfile->state.in_lex_line = 0;
}