diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1999-07-27 00:37:44 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-07-26 20:37:44 -0400 |
commit | 809a5db6e439f655fa80a4c4bf262d0abd3a3008 (patch) | |
tree | 696bcb223addda25be152b1868d6f0ad2f24248e | |
parent | cc7fd3980a3e22fe7740e07a94b29fae59c840ea (diff) | |
download | gcc-809a5db6e439f655fa80a4c4bf262d0abd3a3008.zip gcc-809a5db6e439f655fa80a4c4bf262d0abd3a3008.tar.gz gcc-809a5db6e439f655fa80a4c4bf262d0abd3a3008.tar.bz2 |
input.c (feed_input): Only touch lineno and input_filename if !USE_CPPLIB.
* input.c (feed_input): Only touch lineno and input_filename
if !USE_CPPLIB. Save the old values before setting the new ones.
From-SVN: r28278
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/input.c | 12 |
2 files changed, 9 insertions, 6 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index afa0b86..f9469a4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1999-07-26 Jason Merrill <jason@yorick.cygnus.com> + * input.c (feed_input): Only touch lineno and input_filename + if !USE_CPPLIB. Save the old values before setting the new ones. + * input.c (feed_input): Add file, line parms. * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust. (real_yylex): Check linemode before input_redirected(). diff --git a/gcc/cp/input.c b/gcc/cp/input.c index 12ad47b..7fd97a7 100644 --- a/gcc/cp/input.c +++ b/gcc/cp/input.c @@ -51,10 +51,10 @@ struct input_source { /* linked list maintenance */ struct input_source *next; /* values to restore after reading all of current string */ - char *filename; - int lineno; struct pending_input *input; #if !USE_CPPLIB + char *filename; + int lineno; struct putback_buffer putback; #endif }; @@ -136,6 +136,8 @@ feed_input (str, len, file, line) inp->length = len; inp->offset = 0; inp->putback = putback; + inp->filename = input_filename; + inp->lineno = lineno; putback.buffer = NULL; putback.buffer_size = 0; putback.index = -1; @@ -143,8 +145,6 @@ feed_input (str, len, file, line) input_filename = file; #endif inp->next = input; - inp->filename = input_filename; - inp->lineno = lineno; inp->input = save_pending_input (); input = inp; } @@ -160,12 +160,12 @@ end_input () cpp_pop_buffer (&parse_in); #else putback = inp->putback; + input_filename = inp->filename; + lineno = inp->lineno; #endif end_of_file = 0; input = inp->next; - input_filename = inp->filename; - lineno = inp->lineno; /* Get interface/implementation back in sync. */ extract_interface_info (); restore_pending_input (inp->input); |