Commit 9ab0ddd7 by Richard Stallman

*** empty log message ***

From-SVN: r1452
parent 1600ec67
...@@ -3232,6 +3232,9 @@ pushcase (value, label, duplicate) ...@@ -3232,6 +3232,9 @@ pushcase (value, label, duplicate)
if (index_type == error_mark_node) if (index_type == error_mark_node)
return 0; 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. */ /* Convert VALUE to the type in which the comparisons are nominally done. */
if (value != 0) if (value != 0)
value = convert (nominal_type, value); value = convert (nominal_type, value);
...@@ -3361,6 +3364,10 @@ pushcase_range (value1, value2, label, duplicate) ...@@ -3361,6 +3364,10 @@ pushcase_range (value1, value2, label, duplicate)
} }
case_stack->data.case_stmt.seenlabel = 1; 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. */ /* Convert VALUEs to type in which the comparisons are nominally done. */
if (value1 == 0) /* Negative infinity. */ if (value1 == 0) /* Negative infinity. */
value1 = TYPE_MIN_VALUE(index_type); value1 = TYPE_MIN_VALUE(index_type);
...@@ -3525,7 +3532,7 @@ check_for_full_enumeration_handling (type) ...@@ -3525,7 +3532,7 @@ check_for_full_enumeration_handling (type)
} }
/* Terminate a case (Pascal) or switch (C) statement /* 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. */ Generate the code to test it and jump to the right place. */
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment