aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/operators.def6
-rw-r--r--gcc/cp/parser.c45
3 files changed, 8 insertions, 51 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5737a62..9194192 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2006-08-14 Steve Ellcey <sje@cup.hp.com>
+
+ 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.
+
2006-08-11 Jason Merrill <jason@redhat.com>
PR c++/28559
diff --git a/gcc/cp/operators.def b/gcc/cp/operators.def
index b14835c..4518843 100644
--- a/gcc/cp/operators.def
+++ b/gcc/cp/operators.def
@@ -129,9 +129,6 @@ DEF_SIMPLE_OPERATOR ("->", COMPONENT_REF, "pt", 2)
DEF_SIMPLE_OPERATOR ("[]", ARRAY_REF, "ix", 2)
DEF_SIMPLE_OPERATOR ("++", POSTINCREMENT_EXPR, "pp", 2)
DEF_SIMPLE_OPERATOR ("--", POSTDECREMENT_EXPR, "mm", 2)
-/* These operators are GNU extensions. */
-DEF_SIMPLE_OPERATOR ("<?", MIN_EXPR, "v23min", 2)
-DEF_SIMPLE_OPERATOR (">?", MAX_EXPR, "v23max", 2)
/* This one is needed for mangling. */
DEF_SIMPLE_OPERATOR ("::", SCOPE_REF, "sr", 2)
@@ -147,9 +144,6 @@ DEF_ASSN_OPERATOR ("|=", BIT_IOR_EXPR, "oR", 2)
DEF_ASSN_OPERATOR ("^=", BIT_XOR_EXPR, "eO", 2)
DEF_ASSN_OPERATOR ("<<=", LSHIFT_EXPR, "lS", 2)
DEF_ASSN_OPERATOR (">>=", RSHIFT_EXPR, "rS", 2)
-/* These operators are GNU extensions. */
-DEF_ASSN_OPERATOR ("<?=", MIN_EXPR, "v23miN", 2)
-DEF_ASSN_OPERATOR (">?=", MAX_EXPR, "v23maX", 2)
/* Ternary operators. */
DEF_SIMPLE_OPERATOR ("?:", COND_EXPR, "qu", 3)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 35ce410..7bfa866 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -1150,8 +1150,6 @@ static const cp_parser_binary_operations_map_node binops[] = {
{ CPP_GREATER, GT_EXPR, PREC_RELATIONAL_EXPRESSION },
{ CPP_LESS_EQ, LE_EXPR, PREC_RELATIONAL_EXPRESSION },
{ CPP_GREATER_EQ, GE_EXPR, PREC_RELATIONAL_EXPRESSION },
- { CPP_MIN, MIN_EXPR, PREC_RELATIONAL_EXPRESSION },
- { CPP_MAX, MAX_EXPR, PREC_RELATIONAL_EXPRESSION },
{ CPP_EQ_EQ, EQ_EXPR, PREC_EQUALITY_EXPRESSION },
{ CPP_NOT_EQ, NE_EXPR, PREC_EQUALITY_EXPRESSION },
@@ -1855,16 +1853,6 @@ cp_parser_is_keyword (cp_token* token, enum rid keyword)
return token->keyword == keyword;
}
-/* A minimum or maximum operator has been seen. As these are
- deprecated, issue a warning. */
-
-static inline void
-cp_parser_warn_min_max (void)
-{
- if (warn_deprecated && !in_system_header)
- warning (OPT_Wdeprecated, "minimum/maximum operators are deprecated");
-}
-
/* If not parsing tentatively, issue a diagnostic of the form
FILE:LINE: MESSAGE before TOKEN
where TOKEN is the next token in the input stream. MESSAGE
@@ -5613,8 +5601,6 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p)
{
/* Get an operator token. */
token = cp_lexer_peek_token (parser->lexer);
- if (token->type == CPP_MIN || token->type == CPP_MAX)
- cp_parser_warn_min_max ();
new_prec = TOKEN_PRECEDENCE (token);
@@ -5869,16 +5855,6 @@ cp_parser_assignment_operator_opt (cp_parser* parser)
op = BIT_IOR_EXPR;
break;
- case CPP_MIN_EQ:
- op = MIN_EXPR;
- cp_parser_warn_min_max ();
- break;
-
- case CPP_MAX_EQ:
- op = MAX_EXPR;
- cp_parser_warn_min_max ();
- break;
-
default:
/* Nothing else is an assignment operator. */
op = ERROR_MARK;
@@ -8330,27 +8306,6 @@ cp_parser_operator (cp_parser* parser)
cp_parser_require (parser, CPP_CLOSE_SQUARE, "`]'");
return ansi_opname (ARRAY_REF);
- /* Extensions. */
- case CPP_MIN:
- id = ansi_opname (MIN_EXPR);
- cp_parser_warn_min_max ();
- break;
-
- case CPP_MAX:
- id = ansi_opname (MAX_EXPR);
- cp_parser_warn_min_max ();
- break;
-
- case CPP_MIN_EQ:
- id = ansi_assopname (MIN_EXPR);
- cp_parser_warn_min_max ();
- break;
-
- case CPP_MAX_EQ:
- id = ansi_assopname (MAX_EXPR);
- cp_parser_warn_min_max ();
- break;
-
default:
/* Anything else is an error. */
break;