[cfe-dev] Question on -Wswitch-enum

David Chisnall csdavec at swan.ac.uk
Fri Aug 3 06:23:28 PDT 2012


On 3 Aug 2012, at 12:59, Nicola Gigante wrote:

> So, is this the current behaviour in clang's head, contrary to what David said in the last email?
> 
> If this is fully intentional I can blacklist it, but I still don't understand the rationale, beyond simple
> gcc compatibility.

Sorry, I was wrong, there are two warnings:

-Wswitch does what you want.
-Wswitch-enum does the wrong thing (for GCC compatibility?).

-Weverything enables both.  -Weverything -Wno-switch-enum does what you want, I believe.

David



More information about the cfe-dev mailing list