https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124773
--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:cd86ebc8d27fb53ae6f8187aba8a4b19f6e3f20a commit r15-11084-gcd86ebc8d27fb53ae6f8187aba8a4b19f6e3f20a Author: Jason Merrill <[email protected]> Date: Tue Apr 14 13:49:52 2026 -0400 c++: mangling of extern "C" in anon ns [PR117133] r15-3910 updated decl_linkage to return 'internal' for extern "C" declarations in an anonymous namespace, as specified by C++11. This unintentionally changed the result of unmangled_name_p for such variables, though functions were unaffected. The standard says that only variables with external linkage have language linkage, but it doesn't say anything about name mangling for declarations with internal linkage, so I think we might as well retain the old mangling behavior. I also notice that such variables still get global symbols, as constrain_visibility still thinks that extern "C" takes priority, but let's save fixing that for GCC 17. PR c++/117133 PR c++/124768 PR c++/124773 gcc/cp/ChangeLog: * mangle.cc (unmangled_name_p): Don't mangle internal extern "C" variables. gcc/testsuite/ChangeLog: * g++.dg/abi/mangle84.C: New test. (cherry picked from commit 8b7d44991202e6d62e0dec66dbf98ddda649390c)
