public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17251] New: visibility changes not backward compatible
@ 2004-08-31 12:55 jakub at gcc dot gnu dot org
2004-08-31 13:12 ` [Bug c/17251] " jsm at polyomino dot org dot uk
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-08-31 12:55 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/17251] visibility changes not backward compatible
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
@ 2004-08-31 13:12 ` jsm at polyomino dot org dot uk
2004-08-31 22:46 ` [Bug c/17251] [3.5 Regression] " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-08-31 13:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-31 13:12 -------
Subject: Re: New: visibility changes not backward compatible
On Tue, 31 Aug 2004, jakub at gcc dot gnu dot org wrote:
> 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.
If the return type is a sequence of declaration specifiers, the attribute
forms one of the declaration specifiers and applies to the declaration.
If not - for example, a return type int *__hidden - then it applies to the
return type, as per the syntax in extend.texi.
If you want to make an attribute applied to a function return type really
apply to the function itself, check the flags argument to the handler and
act appropriately. If you want an attribute in the declaration specifiers
to apply instead to the type given in those specifiers, look at the
handling of vector_size attributes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/17251] [3.5 Regression] visibility changes not backward compatible
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
2004-08-31 13:12 ` [Bug c/17251] " jsm at polyomino dot org dot uk
@ 2004-08-31 22:46 ` pinskia at gcc dot gnu dot org
2004-09-13 3:18 ` rth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-31 22:46 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Summary|visibility changes not |[3.5 Regression] visibility
|backward compatible |changes not backward
| |compatible
Target Milestone|--- |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/17251] [3.5 Regression] visibility changes not backward compatible
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
2004-08-31 13:12 ` [Bug c/17251] " jsm at polyomino dot org dot uk
2004-08-31 22:46 ` [Bug c/17251] [3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-09-13 3:18 ` rth at gcc dot gnu dot org
2004-09-18 21:53 ` [Bug c/17251] [4.0 " jakub at gcc dot gnu dot org
2004-09-22 5:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-13 3:18 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC|rth at redhat dot com |rth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/17251] [4.0 Regression] visibility changes not backward compatible
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-09-13 3:18 ` rth at gcc dot gnu dot org
@ 2004-09-18 21:53 ` jakub at gcc dot gnu dot org
2004-09-22 5:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu dot org @ 2004-09-18 21:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2004-09-18 21:53 -------
*** Bug 17555 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |drepper at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/17251] [4.0 Regression] visibility changes not backward compatible
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-09-18 21:53 ` [Bug c/17251] [4.0 " jakub at gcc dot gnu dot org
@ 2004-09-22 5:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-09-22 5:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-09-22 05:09 -------
The compiler is adhering to the documented semantics for attributes.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17251
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-22 5:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-31 12:55 [Bug c/17251] New: visibility changes not backward compatible jakub at gcc dot gnu dot org
2004-08-31 13:12 ` [Bug c/17251] " jsm at polyomino dot org dot uk
2004-08-31 22:46 ` [Bug c/17251] [3.5 Regression] " pinskia at gcc dot gnu dot org
2004-09-13 3:18 ` rth at gcc dot gnu dot org
2004-09-18 21:53 ` [Bug c/17251] [4.0 " jakub at gcc dot gnu dot org
2004-09-22 5:09 ` mmitchel at gcc dot gnu dot org
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).