[Bug c++/122905] [16 regression] ODR warning with C++11 and C++20 std::string use since r16-3233-g7921bb4afcb7a3

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sat Nov 29 09:38:24 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122905

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
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.


More information about the Gcc-bugs mailing list