lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] sequence input editor -- how to get accepted keywords


From: Greg Chicares
Subject: Re: [lmi] sequence input editor -- how to get accepted keywords
Date: Sat, 26 Jun 2010 17:29:28 +0000
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

On 2010-06-26 16:49Z, Vaclav Slavik wrote:
> On Sat, 2010-06-26 at 13:45 +0000, Greg Chicares wrote:
>> (2) I added 'default:' cases to switch statements where MinGW
>> gcc-3.4.5 does not realize that the other cases include every
>> possibility.
> 
> That's a pity; I didn't include 'default:' intentionally, so that we get
> gcc warnings if the enum is extended. It's strange that gcc-3.4 could
> get something as simple as this wrong...

Adding 'default:' prevents '-Wswitch' from warning about that,
but wouldn't '-Wswitch-enum' be suitable?

http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

| -Wswitch-enum
[...]
| The only difference between -Wswitch and this option is that this
| option gives a warning about an omitted enumeration code even if
| there is a default label.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]