OSDN Git Service

PR c++/39371
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2009 19:34:10 +0000 (19:34 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 9 Mar 2009 19:34:10 +0000 (19:34 +0000)
commit5007a69845d131dc7c72d367ae7965d072fe76d3
treead67b3505d09efcb012641d1816d48aa0e3e2fdf
parent488551891cc366040781160f6616055d79d4173d
PR c++/39371
* semantics.c (finish_switch_cond): Don't call get_unwidened.
* decl.c (finish_case_label): Pass SWITCH_STMT_TYPE as 3rd argument
instead of TREE_TYPE (cond).

* g++.dg/opt/switch2.C: Add -w to dg-options.
* g++.dg/warn/Wswitch-1.C: Adjust expected warnings.
* g++.dg/warn/switch1.C: New test.
* g++.dg/other/switch3.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144732 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/semantics.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/switch2.C
gcc/testsuite/g++.dg/other/switch3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wswitch-1.C
gcc/testsuite/g++.dg/warn/switch1.C [new file with mode: 0644]