From: Jason Merrill Date: Tue, 27 Jul 1999 00:37:44 +0000 (+0000) Subject: input.c (feed_input): Only touch lineno and input_filename if !USE_CPPLIB. X-Git-Tag: prereleases/libstdc++-2.92~11508 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=809a5db6e439f655fa80a4c4bf262d0abd3a3008;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index afa0b86e8acc..f9469a40dc4a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 1999-07-26 Jason Merrill + * 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 12ad47ba5210..7fd97a784d27 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);