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.3 Regression] Incorrectly rejects switch((unsigned int)boolvar)



------- Comment #9 from rguenth at gcc dot gnu dot org  2009-06-04 12:35 -------
Subject: Bug 39371

Author: rguenth
Date: Thu Jun  4 12:35:25 2009
New Revision: 148165

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148165
Log:
2009-06-04  Richard Guenther  <rguenther@suse.de>

        Backport from mainline
        2009-03-09  Jakub Jelinek  <jakub@redhat.com>

        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.
        * g++.dg/torture/pr40335.C: New testcase.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/switch3.C
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/torture/pr40335.C
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/switch1.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/decl.c
    branches/gcc-4_3-branch/gcc/cp/semantics.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/opt/switch2.C
    branches/gcc-4_3-branch/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]