Hi, On Tue, 19 Mar 2019, Richard Biener wrote:
> It doesn't really. Consider the following IMHO valid testcase: > > enum X { A, B }; > enum Y { C, D }; > void foo (int *p) > { > *(enum X *)p = A; > *(enum Y *)p = D; > return *(enum X *)p; > } > > int main() > { > int storage; > if (foo (&storage) != A) (You want to require 'B' here, not 'A') > abort (); > } If you want the above testcase to be valid then yes, I agree, you have to give all enums the same alias set as the underlying type. Meh, I don't like it :-/ Ciao, Michael.