From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10598 invoked by alias); 18 Nov 2005 19:39:35 -0000 Received: (qmail 10564 invoked by alias); 18 Nov 2005 19:39:32 -0000 Date: Fri, 18 Nov 2005 19:39:00 -0000 Message-ID: <20051118193932.10563.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/21764] visibility attributes on namespace scope In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "geoffk at geoffk dot org" 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 X-SW-Source: 2005-11/txt/msg02606.txt.bz2 List-Id: ------- Comment #9 from geoffk at geoffk dot org 2005-11-18 19:39 ------- Subject: Re: visibility attributes on namespace scope On 17/11/2005, at 10:15 PM, jason at redhat dot com wrote: > ------- Comment #8 from jason at redhat dot com 2005-11-18 06:15 > ------- > Subject: Re: visibility attributes on namespace scope > > bkoz at gcc dot gnu dot org wrote: >> What do you mean, "less or equal visibility to their enclosing >> scope?" > > Where default > protected > hidden > internal, if a class or namespace > has a specified visibility, nested scopes should have the same > visibility or something later in the above sequence. Although this makes sense for classes, I'm not sure it does for namespaces: namespace foo __attribute__((visibility("hidden"))) { void foo(); void bar() __attribute__((visibility("default"))); } This seems reasonable to me; the attribute on the namespace is setting a default, which is overridden on bar(). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21764