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]

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


It certainly looks like a bug to me.

On 31-Oct-2001, Kazu Hirata <kazu@hxi.com> wrote:
> 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;
>     }
> }

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  | "... it seems to me that 15 years of
The University of Melbourne         | email is plenty for one lifetime."
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- Prof. Donald E. Knuth


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