This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A bug or spec? No warning on a switch case not handled.
- To: gcc at gcc dot gnu dot org
- Subject: A bug or spec? No warning on a switch case not handled.
- From: Kazu Hirata <kazu at hxi dot com>
Hi,
gcc-3.0.1 does not give me a warning when compiling the following code
with -Wswitch. Is this a specification or a bug? (I checked this on
i386-redhat-linux and h8300-hms.)
enum sw { c1, c2 };
void
foo (enum sw s)
{
switch (s)
{
case c1:
break;
}
}
Thanks,
Kazu Hirata