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

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Thu Apr 8 22:48:00 GMT 2004


------- Additional Comments From gdr at integrable-solutions dot net  2004-04-08 22:48 -------
Subject: Re:  [3.4 Regression] namespace associations vs. specializations

"mark at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> writes:

| Subject: Re:  [3.4 Regression] namespace associations vs. specializations
| 
| jason at redhat dot com wrote:
| 
| >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.
| >  
| >
| Changing the overall mangling of specializations is, I think, a complete 
| non-starter; it would totally break conformance to the ABI.  I don't 
| think we should consider that at all.
| 
| I agree that the ugly option is the one consistent with the intended 
| semantics of strong using.  Hopefully there cannot be another template 
| with the same name in the using namespace?

no, there should not be -- it should be a hard error.

| All GCC extensions are evil, even yours. :-) :-)

Bah :-)

| (I've vaguely wondered if the thing you're doing with strong using 
| couldn't be accomplished with linker magic, but it would definitely be 
| ugly and GNU-ld specific.)

that was tried before; it led us to the namespace association
proposal.

-- Gaby


-- 


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



More information about the Gcc-bugs mailing list