[Bug c++/95677] undefined reference to `(anonymous namespace)::xx'

sujian.liu at huawei dot com gcc-bugzilla@gcc.gnu.org
Wed Jul 15 01:40:46 GMT 2020


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

--- Comment #8 from liusujian <sujian.liu at huawei dot com> ---
(In reply to Nathan Sidwell from comment #6)
> Ah, anonymous namespaces have internal linkage (and a program-wide unique
> identifier).  Their contents have the linkage they have.  but because
> they're within the anonumous namespace they cannot be named from elsewhere,
> so they have internal linkage for implementation purposes.
> 
> when we actually gave anonymous namespaces there would be no collisions
> between TUs for '<anon>::x'.  Now we give it a specific name and adjust the
> linkages of their contents. 
> 
> The C++ FE should adjust the linkage of '<anon>::x' too.

Hello, has there been any progress regarding the repair of this issue now?


More information about the Gcc-bugs mailing list