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/lex.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'libcpp/lex.c') diff --git a/libcpp/lex.c b/libcpp/lex.c index cae9b03..6dc0fd9 100644 --- a/libcpp/lex.c +++ b/libcpp/lex.c @@ -1052,11 +1052,6 @@ _cpp_lex_direct (cpp_reader *pfile) buffer->cur++; IF_NEXT_IS ('=', CPP_LSHIFT_EQ, CPP_LSHIFT); } - else if (*buffer->cur == '?' && CPP_OPTION (pfile, cplusplus)) - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_MIN_EQ, CPP_MIN); - } else if (CPP_OPTION (pfile, digraphs)) { if (*buffer->cur == ':') @@ -1083,11 +1078,6 @@ _cpp_lex_direct (cpp_reader *pfile) buffer->cur++; IF_NEXT_IS ('=', CPP_RSHIFT_EQ, CPP_RSHIFT); } - else if (*buffer->cur == '?' && CPP_OPTION (pfile, cplusplus)) - { - buffer->cur++; - IF_NEXT_IS ('=', CPP_MAX_EQ, CPP_MAX); - } break; case '%': @@ -1472,8 +1462,8 @@ cpp_avoid_paste (cpp_reader *pfile, const cpp_token *token1, switch (a) { - case CPP_GREATER: return c == '>' || c == '?'; - case CPP_LESS: return c == '<' || c == '?' || c == '%' || c == ':'; + case CPP_GREATER: return c == '>'; + case CPP_LESS: return c == '<' || c == '%' || c == ':'; case CPP_PLUS: return c == '+'; case CPP_MINUS: return c == '-' || c == '>'; case CPP_DIV: return c == '/' || c == '*'; /* Comments. */ -- cgit v1.1