diff options
author | Zack Weinberg <zack@midnite.ec.rhno.columbia.edu> | 1999-02-15 14:04:21 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 1999-02-15 14:04:21 +0000 |
commit | 4d9a1b48f98e8580eeec9f7f006a6c6a6deef4bd (patch) | |
tree | 12e08c22b74fabe24428ccc67b8228c058221e6f /gcc/c-common.c | |
parent | bd86d7e2b23aa121ff48d2501036d0c164383a19 (diff) | |
download | gcc-4d9a1b48f98e8580eeec9f7f006a6c6a6deef4bd.zip gcc-4d9a1b48f98e8580eeec9f7f006a6c6a6deef4bd.tar.gz gcc-4d9a1b48f98e8580eeec9f7f006a6c6a6deef4bd.tar.bz2 |
c-common.c (UNGETC [USE_CPPLIB=1]): Do nothing if c is EOF.
1999-02-15 16:59 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu>
* c-common.c (UNGETC [USE_CPPLIB=1]): Do nothing if c is EOF.
* c-lex.c: Likewise.
* cpplib.c (cpp_push_buffer, cpp_pop_buffer): Use a linked
list in malloced memory for the buffer stack.
(cpp_get_token): Don't pop the last buffer off the stack.
Calls after CPP_EOF has been returned produce CPP_EOF with no
state change.
(cpp_finish): Pop last buffer here.
(do_line): Don't free ip->last_nominal_fname if it is equal to
ip->fname.
(special_symbol): If a T_CONST is the empty string, push a
single `@ ' escape instead.
(macroexpand): Special symbol buffers have escapes too.
* cpplib.h (struct cpp_buffer): Remove unused fields, add prev
buffer pointer.
(struct cpp_reader): Remove buffer_stack. Add
buffer_stack_depth.
(CPP_PREV_BUFFER, CPP_NULL_BUFFER): Buffer stack is now a
linked list.
From-SVN: r25218
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index f78d524..5975236 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -2826,7 +2826,7 @@ truthvalue_conversion (expr) unsigned char *yy_cur, *yy_lim; #define GETC() (yy_cur < yy_lim ? *yy_cur++ : yy_get_token ()) -#define UNGETC(c) ((c), yy_cur--) +#define UNGETC(c) ((c) == EOF ? 0 : yy_cur--) int yy_get_token () |