diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-20 09:57:13 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-20 09:57:13 +0000 |
commit | 2ca392fdcafbdcf6e7fd18ccd7189425c2248081 (patch) | |
tree | 134a4370313a4f575f6aa704b0deb37112d1b859 /gcc/c-common.h | |
parent | 009e151e858358a0f1d7ef57e6635eee399e3720 (diff) | |
download | gcc-2ca392fdcafbdcf6e7fd18ccd7189425c2248081.tar.gz |
* c-common.h (check_case_value): Remove prototype.
(c_add_case_label): Adjust prototype.
* c-common.c (check_case_value): Make static.
(check_case_bounds): New function.
(c_add_case_label): Use it. Take new argument orig_type.
* c-typeck.c (struct c_switch): New orig_type field.
(c_start_case): Set it.
(do_case): Pass it to c_add_case_label.
* expr.c (expand_expr_real_1): Don't warn for out-of-bounds
cases from here. Add the labels in reverse order.
* stmt.c (struct case_node): Adjust comment. Remove balance field.
(add_case_node): Return nothing, don't check for duplicate cases.
Insert new case nodes in a list, not in an AVL tree.
(expand_end_case_type): Don't turn a case tree into a case list.
(case_tree2list): Remove.
* tree.h (add_case_node): Adjust prototype.
cp/
* cp-tree.h (struct lang_decl_flags): Unify the template_info and
thunk_alias, and the access and virtual_offset fields.
(THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
* decl.c (finish_case_label): Update c_add_case_node call.
testsuite/
* testsuite/gcc.dg/switch-warn-1.c: New test.
* testsuite/gcc.dg/switch-warn-2.c: New test.
* gcc.c-torture/compile/pr14730.c: Update
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 89fc7eed098..8529acec8f6 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -644,8 +644,6 @@ extern void binary_op_error (enum tree_code); #define my_friendly_assert(EXP, N) (void) \ (((EXP) == 0) ? (fancy_abort (__FILE__, __LINE__, __FUNCTION__), 0) : 0) -/* Validate the expression after `case' and apply default promotions. */ -extern tree check_case_value (tree); extern tree fix_string_type (tree); struct varray_head_tag; extern void constant_expression_warning (tree); @@ -818,7 +816,7 @@ extern void extract_interface_info (void); extern int case_compare (splay_tree_key, splay_tree_key); -extern tree c_add_case_label (splay_tree, tree, tree, tree); +extern tree c_add_case_label (splay_tree, tree, tree, tree, tree); extern void c_do_switch_warnings (splay_tree, tree); |