On Fri, Sep 7, 2018 at 6:06 PM Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > > but currently your example can only be handled if the base type is selected > in two passes. Is it worth? Maybe it doesn't matter. My personal expectation was actually that the base type of the values would *always* be the "enum" itself, and then you'd just select the type for the enum based on the values. Then there wouldn't be any difference between bitwise and non-bitwise enums for the individual values. If you have enum a { one = 1, two = 2, }; then "one" and 'two" are always of type "enum a". The only difference with a bitwise enum and one that isn't would be that a non-bitwise enum just then evaluates to "int" (or whatever the size is, based on the value range) much more easily. Your approach (and what we used to do) is to get rid of the "enum a" earlier, so that "one" is always just of type 'int". Or did I mis-understand? Our enum handling has always been kind of half-arsed. Linus