From 1aaabfadd1980b275e76b4e51d97961f4340ff41 Mon Sep 17 00:00:00 2001 From: khan Date: Tue, 14 Dec 1999 05:33:22 +0000 Subject: [PATCH] 1999-12-13 Mumit Khan * lex.c (saving_parse_to_obstack): New global. (reinit_parse_for_block): Use. (reinit_parse_for_expr): Use. (check_newline): Use. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30896 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cp/ChangeLog | 7 +++++++ gcc/cp/lex.c | 12 ++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9521c19..7f5425e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1999-12-13 Mumit Khan + + * lex.c (saving_parse_to_obstack): New global. + (reinit_parse_for_block): Use. + (reinit_parse_for_expr): Use. + (check_newline): Use. + 1999-12-13 Mark Mitchell * optimize.c (initialize_inlined_parameters): Take FN to which the diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c index 8d212ce..a6a1d28 100644 --- a/gcc/cp/lex.c +++ b/gcc/cp/lex.c @@ -113,6 +113,9 @@ file_name_nondirectory (x) struct obstack inline_text_obstack; char *inline_text_firstobj; +/* Nonzero if parse output is being saved to an obstack for later parsing. */ +static int saving_parse_to_obstack = 0; + #if USE_CPPLIB #include "cpplib.h" extern cpp_reader parse_in; @@ -1618,7 +1621,9 @@ reinit_parse_for_block (pyychar, obstackp) { int this_lineno = lineno; + saving_parse_to_obstack = 1; c = skip_white_space (c); + saving_parse_to_obstack = 0; /* Don't lose our cool if there are lots of comments. */ if (lineno == this_lineno + 1) @@ -1747,7 +1752,9 @@ reinit_parse_for_expr (obstackp) { int this_lineno = lineno; + saving_parse_to_obstack = 1; c = skip_white_space (c); + saving_parse_to_obstack = 0; /* Don't lose our cool if there are lots of comments. */ if (lineno == this_lineno + 1) @@ -2489,10 +2496,11 @@ linenum: (2) I don't know how well that would work in the presense of filenames that contain wide characters. */ - if (saw_line) + if (saw_line || saving_parse_to_obstack) { /* Don't treat \ as special if we are processing #line 1 "...". - If you want it to be treated specially, use # 1 "...". */ + If you want it to be treated specially, use # 1 "...". Also + ignore these if saving to an obstack for later parsing. */ ignore_escape_flag = 1; } -- 2.7.4