FreeBSD/contrib/gcc/cp/decl.c
/* Note that we've seen a definition of a case label, and complain if this
   is a bad place for one.  */
Note that we've seen a definition of a case label, and complain if this
is a bad place for one.
Note that we ' ve seen a definition of a case label and complain if this is a bad place for one .
tree
finish_case_label (tree low_value, tree high_value)
{
  tree cond, r;
  struct cp_binding_level *p;
  if (processing_template_decl)
    {
      tree label;
      label = build_decl (LABEL_DECL, NULL_TREE, NULL_TREE);
      return add_stmt (build_case_label (low_value, high_value, label));
    }
  cond = SWITCH_STMT_COND (switch_stack->switch_stmt);
  if (cond && TREE_CODE (cond) == TREE_LIST)
    cond = TREE_VALUE (cond);
  if (!check_switch_goto (switch_stack->level))
    return error_mark_node;
  r = c_add_case_label (switch_stack->cases, cond, TREE_TYPE (cond),
			low_value, high_value);
  for (p = current_binding_level;
       p->kind != sk_function_parms;
       p = p->level_chain)
    p->more_cleanups_ok = 0;
  return r;
}
tree finish_case_label ( tree low_value , tree high_value ) { tree cond , r ; struct cp_binding_level * p ; if ( processing_template_decl ) { tree label ; label = build_decl ( LABEL_DECL , NULL_TREE , NULL_TREE ) ; return add_stmt ( build_case_label ( low_value , high_value , label ) ) ; } cond = SWITCH_STMT_COND ( switch_stack -> switch_stmt ) ; if ( cond && TREE_CODE ( cond ) == TREE_LIST ) cond = TREE_VALUE ( cond ) ; if ( ! check_switch_goto ( switch_stack -> level ) ) return error_mark_node ; r = c_add_case_label ( switch_stack -> cases , cond , TREE_TYPE ( cond ) , low_value , high_value ) ; for ( p = current_binding_level ; p -> kind != sk_function_parms ; p = p -> level_chain ) p -> more_cleanups_ok = 0 ; return r ; }
Note that we've seen a definition of a case label, and complain if this
is a bad place for one.
Note that we ' ve seen a definition of a case label and complain if this is a bad place for one .
/* For templates, just add the case label; we'll do semantic
	 analysis at instantiation-time.  */ /* Find the condition on which this switch statement depends.  */ /* After labels, make any new cleanups in the function go into their
     own new (temporary) binding contour.  */