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
This commit is contained in:
parent
ac1ed908de
commit
b52dbbf865
7 changed files with 29 additions and 91 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue