OSDN Git Service

generalize build_case_label to the rest of the compiler
[pf3gnuchains/gcc-fork.git] / gcc / java / expr.c
index 53feab5..3be1cff 100644 (file)
@@ -1874,8 +1874,8 @@ expand_java_switch (tree selector, int default_pc)
                        NULL_TREE, NULL_TREE);
   java_add_stmt (switch_expr);
 
-  x = build3 (CASE_LABEL_EXPR, void_type_node, NULL_TREE, NULL_TREE,
-             create_artificial_label (input_location));
+  x = build_case_label (NULL_TREE, NULL_TREE,
+                       create_artificial_label (input_location));
   append_to_statement_list (x, &SWITCH_BODY (switch_expr));
 
   x = build1 (GOTO_EXPR, void_type_node, lookup_label (default_pc));
@@ -1891,8 +1891,8 @@ expand_java_add_case (tree switch_expr, int match, int target_pc)
 
   value = build_int_cst (TREE_TYPE (switch_expr), match);
   
-  x = build3 (CASE_LABEL_EXPR, void_type_node, value, NULL_TREE,
-             create_artificial_label (input_location));
+  x = build_case_label (value, NULL_TREE,
+                       create_artificial_label (input_location));
   append_to_statement_list (x, &SWITCH_BODY (switch_expr));
 
   x = build1 (GOTO_EXPR, void_type_node, lookup_label (target_pc));