From 5bbf045f8148eb62a4813716c428bb68c3b6b2c5 Mon Sep 17 00:00:00 2001 From: neil Date: Sun, 28 Apr 2002 19:42:54 +0000 Subject: * cppexp.c (lex): Update to use state.skip_eval. (struct op): Remove prio and flags members. (FLAG_BITS, FLAG_MASK, PRIO_SHIFT, EXTRACT_PRIO, EXTRACT_FLAGS, SHORT_CIRCUIT, RIGHT_ASSOC, ..._PRIO, op_to_prio): Remove. (LEFT_ASSOC): New macro. (optab): New table of operator priorities and flags. (SHIFT): Update. (_cpp_parse_expr): Clean up logic. Return bool. Use a malloc-ed parser stack. (reduce): New; reduce the operator stack. (_cpp_expand_op_stack): Expand the operator stack as necessary. * cpphash.h (struct op): Predeclare. (struct cpp_reader): New members op_stack, op_limit. (struct lexer_state): New member skip_eval. (_cpp_parse_expr): Update. (_cpp_expand_op_stack): New. * cpplib.c (do_if): Update. * cppinit.c (cpp_create_reader): Create op stack. (cpp_destroy): And destroy it. * cpplib.h (CPP_LAST_CPP_OP): Correct. (TTYPE_TABLE): Correct. testsuite: * gcc.dg/cpp/if-mop.c: Update. * gcc.dg/cpp/if-mpar.c: Add test. * gcc.dg/cpp/if-oppr.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@52853 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/cpplib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/cpplib.c') diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 712b9dfe478..a579873c701 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -1366,7 +1366,7 @@ do_if (pfile) int skip = 1; if (! pfile->state.skipping) - skip = _cpp_parse_expr (pfile) == 0; + skip = _cpp_parse_expr (pfile) == false; push_conditional (pfile, skip, T_IF, pfile->mi_ind_cmacro); } -- cgit v1.2.3