This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/39371] [4.2/4.3/4.4 Regression] Incorrectly rejects switch((unsigned int)boolvar)



------- Comment #4 from jakub at gcc dot gnu dot org  2009-03-09 19:34 -------
Subject: Bug 39371

Author: jakub
Date: Mon Mar  9 19:34:10 2009
New Revision: 144732

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144732
Log:
        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.

Added:
    trunk/gcc/testsuite/g++.dg/other/switch3.C
    trunk/gcc/testsuite/g++.dg/warn/switch1.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/g++.dg/opt/switch2.C
    trunk/gcc/testsuite/g++.dg/warn/Wswitch-1.C


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39371


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]