aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
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/lex.c
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/lex.c')
-rw-r--r--libcpp/lex.c14
1 files changed, 2 insertions, 12 deletions
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. */