aboutsummaryrefslogtreecommitdiff
path: root/libcpp/include/cpplib.h
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2006-08-14 23:13:54 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2006-08-14 23:13:54 +0000
commitb52dbbf86510c011400a97e204cf9384fef83b0c (patch)
tree3997bb50dfd7d49e1c239b1d5843cf07e8405f16 /libcpp/include/cpplib.h
parentac1ed908de999523efc36f38e69bca1aadfe0808 (diff)
downloadgcc-b52dbbf86510c011400a97e204cf9384fef83b0c.zip
gcc-b52dbbf86510c011400a97e204cf9384fef83b0c.tar.gz
gcc-b52dbbf86510c011400a97e204cf9384fef83b0c.tar.bz2
re PR c++/28288 (ICE with min/max operator)
PR c++/28288 PR c++/14556 * operators.def: Remove <?, ?>, <?=, and >?= 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 <?, >?, <?=, and >?= 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
Diffstat (limited to 'libcpp/include/cpplib.h')
-rw-r--r--libcpp/include/cpplib.h13
1 files changed, 6 insertions, 7 deletions
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, "<?") /* extension */ \
- OP(MAX, ">?") \
\
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, "<?=") /* extension */ \
- OP(MAX_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