c/7127: -Wswitch ineffective on GCC 3.0/Debian (Regression from 2.95)
claus.fischer@clausfischer.com
claus.fischer@clausfischer.com
Tue Jun 25 16:16:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list