diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2010-10-27 17:42:36 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-10-27 17:42:36 -0400 |
commit | 81f0bab25ec7d17b84e94ee7322aa953a75584a7 (patch) | |
tree | ffd5d52f502eeecf4274ffa2c4c9a0e6c6360099 /gcc/cp/decl.c | |
parent | 5ac13b8e0c688dcf1251aee3f90eddfc1e5ba43f (diff) | |
download | gcc-81f0bab25ec7d17b84e94ee7322aa953a75584a7.zip gcc-81f0bab25ec7d17b84e94ee7322aa953a75584a7.tar.gz gcc-81f0bab25ec7d17b84e94ee7322aa953a75584a7.tar.bz2 |
c-common.c (check_case_value): Remove special C++ code.
c-family/
* c-common.c (check_case_value): Remove special C++ code.
cp/
* decl.c (finish_case_label): Use decl_constant_value.
From-SVN: r166019
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 8b2af9cd..d73d109 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -2938,6 +2938,11 @@ finish_case_label (location_t loc, tree low_value, tree high_value) if (!check_switch_goto (switch_stack->level)) return error_mark_node; + if (low_value) + low_value = decl_constant_value (low_value); + if (high_value) + high_value = decl_constant_value (high_value); + r = c_add_case_label (loc, switch_stack->cases, cond, SWITCH_STMT_TYPE (switch_stack->switch_stmt), low_value, high_value); |