Commit 3c46fbf6 by Richard Kenner

(expand_end_case): Move conversion of case_list before

check_for_full_enumeration_handling.

From-SVN: r11769
parent 700ad580
......@@ -4871,6 +4871,10 @@ expand_end_case (orig_index)
/* An ERROR_MARK occurs for various reasons including invalid data type. */
if (index_type != error_mark_node)
{
if (thiscase->data.case_stmt.case_list)
thiscase->data.case_stmt.case_list
= case_tree2list (thiscase->data.case_stmt.case_list, 0);
/* If switch expression was an enumerated type, check that all
enumeration literals are covered by the cases.
No sense trying this if there's a default case, however. */
......@@ -4908,10 +4912,6 @@ expand_end_case (orig_index)
before_case = get_last_insn ();
if (thiscase->data.case_stmt.case_list)
thiscase->data.case_stmt.case_list
= case_tree2list(thiscase->data.case_stmt.case_list, 0);
/* Simplify the case-list before we count it. */
group_case_nodes (thiscase->data.case_stmt.case_list);
......
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