[Bug c++/13294] [3.4 Regression] namespace associations vs. specializations

jason at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Apr 7 17:58:00 GMT 2004


------- Additional Comments From jason at redhat dot com  2004-04-07 17:58 -------
Subject: Re:  [3.4 Regression] namespace associations vs.
 specializations

On 6 Apr 2004 09:01:22 -0000, "mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> wrote:

> However, it seems to me that the problem you point out is still problematic in
> that it means that the mangling of the specialization of "f" differs depending
> on the strongly-used namespace.  I'd think that we want the mangling to be
> independent of that so that debug/optimized versions of the library get the same
> mangled name.

Yes, after thinking about it some more I think we need to handle this case
the same as the other.

Unfortunately, the ABI mangling scheme doesn't really allow for this; a
function template instantiation/specialization is mangled using the
signature of the template and then the parameters; see
get_mostly_instantiated_function_type.  To properly reflect the scope of
the specialization under this scheme we would need to tweak the template
signature, pretending that this is a specialization of some other imaginary
template.  This is doable, but not attractive.

I don't think we want to change how specializations are mangled in general.

Another possibility would be to change our minds and go back to using the
template context in mangling.

My feeling is that the ugly option above is the best one, but I'm very
interested in other thoughts.

I should be able to have it implemented tomorrow if people agree.

Jason


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13294



More information about the Gcc-bugs mailing list