[Bug c++/70413] Class template names in anonymous namespaces are not globally unique
trippels at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Apr 6 06:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70413
--- Comment #3 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
This gets wrongly set here:
decl2.c:
2912 else if (DECL_TEMPLOID_INSTANTIATION (decl))
2913 {
2914 /* DECL is an implicit instantiation of a function or static
2915 data member. */
2916 if ((flag_implicit_templates
2917 && !flag_use_repository)
2918 || (flag_implicit_inline_templates
2919 && TREE_CODE (decl) == FUNCTION_DECL
2920 && DECL_DECLARED_INLINE_P (decl)))
2921 comdat_p = true;
2922 else
But for instantiations with types defined in anon namespace this is wrong
and "TREE_PUBLIC (decl) = 0" should be used instead.
More information about the Gcc-bugs
mailing list