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:
Steve Ellcey 2006-08-14 23:13:54 +00:00 committed by Steve Ellcey
parent ac1ed908de
commit b52dbbf865
7 changed files with 29 additions and 91 deletions

View file

@ -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. */