public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes
@ 2003-01-15 19:06 mueller
  0 siblings, 0 replies; 3+ messages in thread
From: mueller @ 2003-01-15 19:06 UTC (permalink / raw)
  To: gcc-gnats


>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 <stdio.h>

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:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes
@ 2003-01-22 23:33 ehrhardt
  0 siblings, 0 replies; 3+ messages in thread
From: ehrhardt @ 2003-01-22 23:33 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mueller, nobody

Synopsis: __attribute__ ((visibility("hidden")) should apply to classes

State-Changed-From-To: open->closed
State-Changed-By: cae
State-Changed-When: Wed Jan 22 23:33:04 2003
State-Changed-Why:
    Duplicate of 9283.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9332


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes
@ 2003-01-22 21:16 Dirk Mueller
  0 siblings, 0 replies; 3+ messages in thread
From: Dirk Mueller @ 2003-01-22 21:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR middle-end/9332; it has been noted by GNATS.

From: Dirk Mueller <dmuell@gmx.net>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes
Date: Wed, 22 Jan 2003 21:06:20 +0100

 On Mit, 15 Jan 2003, gcc-gnats@gcc.gnu.org wrote:
 
 can you please merge this report with c++/9282 ? I've reported it twice 
 because somehow GNATS was broken inbetween. 
 
 Thanks,
 
 
 -- 
 Dirk


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-01-22 23:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-15 19:06 middle-end/9332: __attribute__ ((visibility("hidden")) should apply to classes mueller
2003-01-22 21:16 Dirk Mueller
2003-01-22 23:33 ehrhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).