This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/17251] New: visibility changes not backward compatible
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2004 12:55:33 -0000
- Subject: [Bug c/17251] New: visibility changes not backward compatible
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct S { int a; };
struct S *a, b;
int c, *d;
#define __hidden __attribute__((visibility ("hidden")))
struct S * __hidden foo0 (void) { return a; }
__hidden struct S *bar0 (void) { return a; }
struct S *baz0 (void) __hidden;
struct S *baz0 (void) { return a; }
int __hidden foo1 (void) { return c; }
__hidden int bar1 (void) { return c; }
int baz1 (void) __hidden;
int baz1 (void) { return c; }
struct S __hidden foo2 (void) { return b; }
__hidden struct S bar2 (void) { return b; }
struct S baz2 (void) __hidden;
struct S baz2 (void) { return b; }
int * __hidden foo3 (void) { return d; }
__hidden int *bar3 (void) { return d; }
int *baz3 (void) __hidden;
int *baz3 (void) { return d; }
is compiled differently with current CVS than it used to be before the
latest visibility changes in July/August.
Before, all functions were hidden, now foo0 and foo3 is not.
This is related to making visibility attribute apply not just to FUNCTION_DECLs,
but also to types.
The thing unclear to me is why the attribute located in between return type
and function name is sometimes applicable to the return type and sometimes
to the FUNCTION_DECL.
--
Summary: visibility changes not backward compatible
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,rth at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251