This is the mail archive of the gcc-bugs@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]

[Bug other/15000] Support setting the default symbol visibility for ELF


------- Additional Comments From s_gccbugzilla at nedprod dot com  2004-05-03 04:18 -------
(In reply to comment #22)
> I'd be surprised if that happens with the old patch, either... certainly it's
> not something I've tested. (The old patch always initializes a new class on 
the
> class stack with VISIBILITY_DEFAULT, so I don't see how the visibility would
> come from anywhere other than the inner class's attributes).
> 
> I'm not really sure how to make it work, either... I'd need to think about it
> some more.

I could have sworn that my old test piece of code tested this and it worked 
(unfortunately I must have deleted it as I can't find it now). However testing 
my patch based on your old one shows that I am quite wrong and indeed the 
original patch didn't do it either. I must be getting old :(

Nevertheless the sentiment remains good I think - classes should inherit their 
visibility off their enclosing class when present. I'm a little busy right now 
but I intend to get onto this sometime this week. It seems to me that the 
visibility can't be stored in the typeinfo if that isn't available at the point 
of constructing nested class decls unless some (probably complex) machinery is 
used to propagate any class settings through all nested class' typeinfos too (I 
can't see how to easily obtain a list of nested classes other than iterate 
through everything which seems inefficient). If your thoughts yield anything, 
please do let me know lest we reinvent the wheel!

Cheers,
Niall


-- 


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


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