diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-09 19:41:12 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-09 19:41:12 +0000 |
commit | 0653b94e4e5de2cc915c8a357964d59e78ca02c7 (patch) | |
tree | d5bb51bad6a6b24f2b2de095f7c7474492e78f9a /gcc/cpplex.c | |
parent | 91b57e101e3215bd6e6d906aba5fe8987175a8df (diff) | |
download | gcc-0653b94e4e5de2cc915c8a357964d59e78ca02c7.tar.gz |
* configure.in (--enable-c-cpplib): Uncomment. Use AC_DEFINE
instead of extra_c_flags.
(--enable-c-mbchar): Use AC_DEFINE instead of extra_c_flags.
* configure: Regenerate.
* config.in: Regenerate.
* cpperror.c (cpp_type2name): New function.
* cpplex.c (lex_line): If we issued an error for an invalid
preprocessing directive, discard that logical line.
* cpplib.c (do_line): Call a hook function if the current file
is renamed by #line.
(do_ident): Pass the contents of the string, not the entire
token, to the callback function.
* cpplib.h (CPP_LAST_PUNCTUATOR): New #define.
(cb.rename_file): New hook function.
(cb.ident): Adjust prototype.
(cpp_type2name): Prototype.
* cppmacro.c (dump_macro_args): Correct precedence lossage.
* cppmain.c (cb_ident): Update for changed interface.
(cb_rename_file): New function.
(main): Set rename callback.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35593 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplex.c')
-rw-r--r-- | gcc/cpplex.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cpplex.c b/gcc/cpplex.c index 5307edc730a..c2052bce311 100644 --- a/gcc/cpplex.c +++ b/gcc/cpplex.c @@ -1294,7 +1294,8 @@ lex_line (pfile, list) if (!(list->flags & LIST_OFFSET)) (abort) (); - + + retry: list->file = buffer->nominal_fname; list->line = CPP_BUF_LINE (buffer); pfile->col_adjust = 0; @@ -1823,6 +1824,10 @@ lex_line (pfile, list) first[1].val.node->name); else cpp_error (pfile, "invalid preprocessing directive"); + + /* Discard this line to prevent further errors from cc1. */ + _cpp_clear_toklist (list); + goto retry; } /* Put EOF at end of known directives. This covers "directives do |