From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27380 invoked by alias); 15 Jan 2003 19:06:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27358 invoked by uid 71); 15 Jan 2003 19:06:01 -0000 Resent-Date: 15 Jan 2003 19:06:01 -0000 Resent-Message-ID: <20030115190601.27357.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, mueller@kde.org Received: (qmail 24984 invoked from network); 15 Jan 2003 19:00:35 -0000 Received: from unknown (HELO mail.gmx.net) (213.165.64.20) by sources.redhat.com with SMTP; 15 Jan 2003 19:00:35 -0000 Received: (qmail 12845 invoked by uid 0); 15 Jan 2003 19:00:30 -0000 Received: from pd9ed5a79.dip.t-dialin.net (HELO bembel.homeip.net) (217.237.90.121) by mail.gmx.net (mp023-rz3) with SMTP; 15 Jan 2003 19:00:30 -0000 Received: by bembel.homeip.net (Postfix, from userid 1024) id 438C43947DF; Wed, 15 Jan 2003 20:00:14 +0100 (CET) Message-Id: <20030115190014.438C43947DF@bembel.homeip.net> Date: Wed, 15 Jan 2003 19:06:00 -0000 From: mueller@kde.org To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: 3.113 Subject: middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes X-SW-Source: 2003-01/txt/msg00970.txt.bz2 List-Id: >Number: 9332 >Category: middle-end >Synopsis: __attribute__ ((visibility("hidden")) should apply to classes >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: change-request >Submitter-Id: net >Arrival-Date: Wed Jan 15 11:06:01 PST 2003 >Closed-Date: >Last-Modified: >Originator: Dirk Mueller >Release: 3.3 >Organization: KDE >Environment: System: Linux matrix 2.4.19-4GB #1 Thu Nov 14 09:55:36 UTC 2002 i686 unknown Architecture: i686 host: i486-suse-linux-gnu build: i486-suse-linux-gnu target: i486-suse-linux-gnu configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux >Description: gcc should allow to apply the visibility attribute to classes and other complex types. It should behave as if the visibility attribute was specified on each member function and variable, unless one of them "overwrites" the setting by specifying a custom visibility. This feature is necessary to easily control the amount of exported symbols in bigger C/C++ projects. >How-To-Repeat: try to compile this example file: #include class __attribute__( ( visibility( "hidden" ) ) ) MyClass { public: MyClass(); static int member; }; int MyClass::member; MyClass::MyClass() { } int main() { MyClass f; printf( "%d",MyClass::member ); return 0; } #g++ -Wall test.cc test.cc:9: warning: `visibility' attribute does not apply to types >Fix: see above. >Release-Note: >Audit-Trail: >Unformatted: