From b52dbbf86510c011400a97e204cf9384fef83b0c Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Mon, 14 Aug 2006 23:13:54 +0000 Subject: re PR c++/28288 (ICE with min/max operator) PR c++/28288 PR c++/14556 * operators.def: Remove , ?= operators. * parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ. (cp_parser_warn_min_max): Remove. * include/cpplib.h: Remove ?, ?= tokens. (CPP_LAST_EQ): Change. (CPP_LAST_PUNCTUATOR): Change. * expr.c (cpp_operator): Remove MIN and MAX. (reduce): Remove CPP_MIN and CPP_MAX. (num_binary_op): Ditto. * lex.c (_cpp_lex_direct): Ditto. (cpp_avoid_paste): Remove ? as legal symbol after > or <. From-SVN: r116140 --- libcpp/include/cpplib.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'libcpp/include/cpplib.h') diff --git a/libcpp/include/cpplib.h b/libcpp/include/cpplib.h index 2cea1f5..5fb80d9 100644 --- a/libcpp/include/cpplib.h +++ b/libcpp/include/cpplib.h @@ -51,7 +51,10 @@ struct _cpp_file; The first group, to CPP_LAST_EQ, can be immediately followed by an '='. The lexer needs operators ending in '=', like ">>=", to be in - the same order as their counterparts without the '=', like ">>". */ + the same order as their counterparts without the '=', like ">>". + + See the cpp_operator table optab in expr.c if you change the order or + add or remove anything in the first group. */ #define TTYPE_TABLE \ OP(EQ, "=") \ @@ -68,8 +71,6 @@ struct _cpp_file; OP(XOR, "^") \ OP(RSHIFT, ">>") \ OP(LSHIFT, "<<") \ - OP(MIN, "?") \ \ OP(COMPL, "~") \ OP(AND_AND, "&&") /* logical */ \ @@ -97,8 +98,6 @@ struct _cpp_file; OP(XOR_EQ, "^=") \ OP(RSHIFT_EQ, ">>=") \ OP(LSHIFT_EQ, "<<=") \ - OP(MIN_EQ, "?=") \ /* Digraphs together, beginning with CPP_FIRST_DIGRAPH. */ \ OP(HASH, "#") /* digraphs */ \ OP(PASTE, "##") \ @@ -146,9 +145,9 @@ enum cpp_ttype N_TTYPES, /* Positions in the table. */ - CPP_LAST_EQ = CPP_MAX, + CPP_LAST_EQ = CPP_LSHIFT, CPP_FIRST_DIGRAPH = CPP_HASH, - CPP_LAST_PUNCTUATOR= CPP_DOT_STAR, + CPP_LAST_PUNCTUATOR= CPP_ATSIGN, CPP_LAST_CPP_OP = CPP_LESS_EQ }; #undef OP -- cgit v1.1