From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23253 invoked by alias); 7 Apr 2004 19:18:16 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 23106 invoked by alias); 7 Apr 2004 19:18:04 -0000 Date: Wed, 07 Apr 2004 19:18:00 -0000 Message-ID: <20040407191804.23105.qmail@sources.redhat.com> From: "mark at codesourcery dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20031204043712.13294.bkoz@gcc.gnu.org> References: <20031204043712.13294.bkoz@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/13294] [3.4 Regression] namespace associations vs. specializations X-Bugzilla-Reason: CC X-SW-Source: 2004-04/txt/msg00664.txt.bz2 List-Id: ------- Additional Comments From mark at codesourcery dot com 2004-04-07 19:17 ------- Subject: Re: [3.4 Regression] namespace associations vs. specializations jason at redhat dot com wrote: >------- 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" 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? All GCC extensions are evil, even yours. :-) :-) (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.) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13294