This is the mail archive of the gcc-prs@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]

c/7127: -Wswitch ineffective on GCC 3.0/Debian (Regression from 2.95)


>Number:         7127
>Category:       c
>Synopsis:       -Wswitch ineffective on GCC 3.0/Debian (Regression from 2.95)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 25 15:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Claus Fischer
>Release:        GCC 3.0.4-7 as packaged in Debian testing
>Organization:
>Environment:
Debian GNU/Linux Woody
>Description:
In Debian's gcc 3.0.4-7 the -Wswitch option does not work as expected; gcc 2.95 does:
cat >t.c <<EOF
enum {a, b} x = a;

int main()
{
    switch (x)
    {
    case a:
    break;
    }
    return 0;
}
EOF

$ gcc -Wswitch -o t t.c
  t.c: In function `main':
  t.c:9: warning: enumeration value `b' not handled in switch

$ gcc-3.0 -Wswitch -o t t.c

(No warning message).

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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