efriedma-quic wrote: The C notion of "compatibility" with regard to enums is a bit weird... clang and gcc disagree whether `enum e : int; enum e2: int; enum e x; int x; enum e2 x;` is valid because 6.2.7 doesn't actually define what's supposed to happen. Probably this should be illegal, but the standard isn't really clear here. Maybe it should be clarified to have a notion of "redeclaration compatibility" which is separate from general type compatibility.
That said, this patch is pretty conservative; it's hard for me to imagine treating an enum as the underlying type could cause any issues (unless code is assuming an enum has universal aliasing). I guess this should be compatible with older clang versions, so we don't need to rev the version of TBAA data. https://github.com/llvm/llvm-project/pull/73326 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits