This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++] Avoid C++ FE creating !public weak variables


> On 11/12/2009 02:38 PM, Jan Hubicka wrote:
>> With some further sanity checking I noticed that with -fno-weak we also tend to
>> create DECL_COMDAT !TREE_PUBLIC functions.  This is caused by comdat_linkage function
>> that simply drops to this path when no weak support is there.
>> Is this expected behaviour or shall we also clear COMDAT flag here?
>> Some of cgraph code assumes that COMDAT decls are public, I can fix it on that side too.
>
> I'm not sure what the best answer is for vague-linkage functions that we  
> can't actually share between translation units because of target  
> limitations.  There is some code in the front end that expects  
> DECL_COMDAT to be set on these decls, though it could be changed to use  
> a different test.

This is moderately ugly from backend perspective to have random flag set that
make no real difference.  If it would help cp FE, we can also just clear this
flag in the visibility pass where we mangle the flags anyway.

Honza
>
> Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]