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

A bug or spec? No warning on a switch case not handled.


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


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