From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11630 invoked by alias); 3 May 2004 04:18:18 -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 11623 invoked by uid 48); 3 May 2004 04:18:16 -0000 Date: Mon, 03 May 2004 04:18:00 -0000 Message-ID: <20040503041816.11621.qmail@sources.redhat.com> From: "s_gccbugzilla at nedprod dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040418032536.15000.bryner@brianryner.com> References: <20040418032536.15000.bryner@brianryner.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug other/15000] Support setting the default symbol visibility for ELF X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg00131.txt.bz2 List-Id: ------- 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