[cfe-dev] clang++: '-Wswitch-enum' turned on by default

Douglas Gregor dgregor at apple.com
Thu Sep 16 06:42:14 PDT 2010


On Sep 16, 2010, at 3:30 AM, Alexandre Colucci wrote:

> Hey,
> 
> I noticed that clang++ seems to always use the option '-Wswitch-enum'. Shouldn't it be turned off by default?

No, it's an excellent warning to have on by default.

> Or is there a way to turn it off?

-Wno-switch-enum

> My projects contain a lot of files. When I compile them with clang++, I get thousands of "Enumeration value 'xxx' not handled in switch" warnings .
> I would like to avoid to fix all these warnings. This issue also occurs with Xcode 4.0b3.
> I filed the bug 8164.


	- Doug



More information about the cfe-dev mailing list