summaryrefslogtreecommitdiffstats
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-30 02:40:48 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-05-30 02:40:48 +0000
commit8d15094a56bb4ff9ee3e1daba104a5b39a953490 (patch)
treed00c4ee461538b9857b27d0d4789a07da42adf5e /gcc/cppexp.c
parent092d65690d3a28d910394a32369fb7c59c7b0fc4 (diff)
downloadppe42-gcc-8d15094a56bb4ff9ee3e1daba104a5b39a953490.tar.gz
ppe42-gcc-8d15094a56bb4ff9ee3e1daba104a5b39a953490.zip
* cpplib.c (do_if): Don't save and restore only_seen_white here.
* cppexp.c (_cpp_parse_expr): Save and restore only_seen_white and skipping here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34260 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index b50acd8bb3c..58430c331e2 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -843,6 +843,12 @@ _cpp_parse_expr (pfile)
int result;
char buff[5];
+ /* Save parser state and set it to something sane. */
+ int save_only_seen_white = pfile->only_seen_white;
+ int save_skipping = pfile->skipping;
+ pfile->only_seen_white = 0;
+ pfile->skipping = 0;
+
/* We've finished when we try to reduce this. */
top->op = FINISHED;
/* Nifty way to catch missing '('. */
@@ -1162,5 +1168,7 @@ _cpp_parse_expr (pfile)
if (stack != init_stack)
free (stack);
CPP_SET_WRITTEN (pfile, old_written);
+ pfile->only_seen_white = save_only_seen_white;
+ pfile->skipping = save_skipping;
return result;
}
OpenPOWER on IntegriCloud