[cfe-commits] [Patch] Add a warning to catch enums with all elements having the same value

Jordan Rose jediknil at belkadan.com
Tue May 15 20:44:46 PDT 2012

On May 15, 2012, at 22:25, Richard Trieu wrote:

> On Tue, May 15, 2012 at 6:51 PM, Jordy Rose <jediknil at belkadan.com> wrote:
>> This will crash if the two values have the same bit width, but different signedness. I'm not sure if you can do that with enums, but...
> I tried sticking some negative values in there, but didn't see any crashing.   Do you have an example of this happening?

I meant signed vs. unsigned, but it looks like the EnumConstantDecls should already have a consistent type by this point. I can't get it to trigger in C or C++ mode. Sorry for crying wolf!


More information about the cfe-commits mailing list