From 9ab0ddd73b118d0ba6d429dcf2770b889a5972ab Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 5 Jul 1992 21:59:55 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r1452 --- gcc/stmt.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/stmt.c b/gcc/stmt.c index a6d98e64f4d..6e55df2a732 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -3232,6 +3232,9 @@ pushcase (value, label, duplicate) if (index_type == error_mark_node) return 0; + /* There may be NOP_EXPR around the value if we got it from an enum. */ + STRIP_NOPS (arg); + /* Convert VALUE to the type in which the comparisons are nominally done. */ if (value != 0) value = convert (nominal_type, value); @@ -3361,6 +3364,10 @@ pushcase_range (value1, value2, label, duplicate) } case_stack->data.case_stmt.seenlabel = 1; + /* There may be NOP_EXPR around the value if we got it from an enum. */ + STRIP_NOPS (value1); + STRIP_NOPS (value2); + /* Convert VALUEs to type in which the comparisons are nominally done. */ if (value1 == 0) /* Negative infinity. */ value1 = TYPE_MIN_VALUE(index_type); @@ -3525,7 +3532,7 @@ check_for_full_enumeration_handling (type) } /* Terminate a case (Pascal) or switch (C) statement - in which CASE_INDEX is the expression to be tested. + in which ORIG_INDEX is the expression to be tested. Generate the code to test it and jump to the right place. */ void -- 2.30.2