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

Re: [PATCH] Fix PR C/18479, visibility and structs and C



On Nov 25, 2004, at 7:51 PM, Andrew Pinski wrote:


The problem is that the C TYPE_NAME of a type for a struct is a
IDENTIFIER_NODE but in C++ it is TYPE_DECL.  We just did not take
this into account in handle_visibility_attribute.  This patch fixes
the problem and we warn about the attribute being ignored also.

OK? Bootstrapped and tested on powerpc-darwin with no regressions.

Oh, I had forgot the testcase.


/* { dg-do compile }
struct __attribute__ ((visibility("default"))) Foo { int foo; }; /* { dg-warning "attribute ignored on types" } */



-- Pinski



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