This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: namespace namespace
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Dave Korn <dave dot korn dot cygwin at googlemail dot com>, Andrew Haley <aph at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Wed, 08 Jul 2009 01:15:03 +0100
- Subject: Re: namespace namespace
- References: <4A41EF61.4060902@redhat.com> <4A421391.6020901@intertwingly.net> <4A48FC28.60608@redhat.com> <4A49F80E.3000605@gmail.com> <4A4A07F5.2040806@redhat.com> <4A4A101A.3090609@gmail.com> <4A4A136A.8040404@redhat.com> <20090630133910.GY4462@tyan-ft48-01.lab.bos.redhat.com> <4A4A1A51.90306@gmail.com> <4A53C35F.3020704@gmail.com> <20090707220615.GJ4462@tyan-ft48-01.lab.bos.redhat.com>
Jakub Jelinek wrote:
> On Tue, Jul 07, 2009 at 10:51:27PM +0100, Dave Korn wrote:
>>> I don't, but I didn't know that for sure until you said above that it would
>>> definitely never be exported.
>> Ok, now I do, and they are(*).
>
> That would be a target bug then.
Yep, that's what I meant by target hooks.
>> I take it that this is a bug in the dllexport attribute getting propagated
>> unduly to clones when it should only be applied to the original (non-cloned)
>> version, and not that these clones are meant to be externally visible for some
>> reason I don't understand?
>>
>> There's presumably an issue with the handling in the backend hooks, which I
>> should be able to track down without too much difficulty, but you could help
>> me with one bit of advice: how do I detect when I've been handed the tree for
>> a decl of a cloned function rather than an original?
>
> /* Update the properties.
> Make clone visible only within this translation unit. Make sure
> that is not weak also.
> ??? We cannot use COMDAT linkage because there is no
> ABI support for this. */
> DECL_EXTERNAL (new_node->decl) = 0;
> DECL_COMDAT_GROUP (new_node->decl) = 0;
> TREE_PUBLIC (new_node->decl) = 0;
> DECL_COMDAT (new_node->decl) = 0;
> DECL_WEAK (new_node->decl) = 0;
>
> Certainly !TREE_PUBLIC functions shouldn't be exported from the current
> assembly file in any way...
That should do for me. Thanks!
cheers,
DaveK