https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122905
--- Comment #11 from Nathaniel Shead <nshead at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #9) > Why does the r16-3233 change anything for class scope unnamed enums? Those > always have the linkage of the containing class, don't they? If it would be > restricted just to namespace scope unnamed enums, there would be no ODR > violation. > Or if there is some reason for that, we might want some flag on the enum and > make the LTO ODR checking ignore mismatches of no DECL_NAME vs. DECL_NAME of > the first enumerator. This was only really intended to apply to namespace-scope enums. The wording change didn't specify this though and I overlooked this, but I agree that the correct fix should probably be to just add `TYPE_NAMESPACE_SCOPE_P`.
