* [Bug c++/55877] [4.6/4.7/4.8 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
@ 2013-01-04 15:24 ` jason at gcc dot gnu.org
2013-01-04 15:28 ` jakub at gcc dot gnu.org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-04 15:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-01-04
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6/4.7/4.8 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
2013-01-04 15:24 ` [Bug c++/55877] " jason at gcc dot gnu.org
@ 2013-01-04 15:28 ` jakub at gcc dot gnu.org
2013-01-04 16:51 ` jason at gcc dot gnu.org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-04 15:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.4
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6/4.7/4.8 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
2013-01-04 15:24 ` [Bug c++/55877] " jason at gcc dot gnu.org
2013-01-04 15:28 ` jakub at gcc dot gnu.org
@ 2013-01-04 16:51 ` jason at gcc dot gnu.org
2013-01-04 16:51 ` jason at gcc dot gnu.org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-04 16:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-04 16:50:37 UTC ---
Author: jason
Date: Fri Jan 4 16:50:28 2013
New Revision: 194910
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194910
Log:
PR c++/55877
* decl.c (reset_type_linkage, bt_reset_linkage): New.
(grokdeclarator): Use reset_type_linkage.
* name-lookup.c (binding_table_foreach): Handle null table.
* tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/anon11.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/cp/name-lookup.c
trunk/gcc/cp/tree.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6/4.7/4.8 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2013-01-04 16:51 ` jason at gcc dot gnu.org
@ 2013-01-04 16:51 ` jason at gcc dot gnu.org
2013-01-04 16:58 ` [Bug c++/55877] [4.6 " jason at gcc dot gnu.org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-04 16:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-04 16:51:12 UTC ---
Author: jason
Date: Fri Jan 4 16:51:02 2013
New Revision: 194911
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194911
Log:
PR c++/55877
* decl.c (reset_type_linkage, bt_reset_linkage): New.
(grokdeclarator): Use reset_type_linkage.
* name-lookup.c (binding_table_foreach): Handle null table.
* tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/ext/visibility/anon11.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/decl.c
branches/gcc-4_7-branch/gcc/cp/name-lookup.c
branches/gcc-4_7-branch/gcc/cp/tree.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2013-01-04 16:51 ` jason at gcc dot gnu.org
@ 2013-01-04 16:58 ` jason at gcc dot gnu.org
2013-01-04 17:08 ` jakub at gcc dot gnu.org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-04 16:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Summary|[4.6/4.7/4.8 Regression] |[4.6 Regression] Anon
|Anon visibility issues |visibility issues
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-04 16:58:14 UTC ---
Fixed in 4.7 and 4.8. I'm happy to apply the fix to 4.6 if anyone cares about
it, but suspect that nobody does since the bug has gone undetected so long.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2013-01-04 16:58 ` [Bug c++/55877] [4.6 " jason at gcc dot gnu.org
@ 2013-01-04 17:08 ` jakub at gcc dot gnu.org
2013-01-04 20:32 ` jason at gcc dot gnu.org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-01-04 17:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-01-04 17:07:55 UTC ---
The reason for listing 4.6 was that the PR54883 change has been applied to 4.6
branch fairly recently, making it for the enum case a recent 4.6 regression.
BTW, what about:
typedef struct {
typedef enum { X, Y } A;
typedef struct { } B;
struct C {
static void fn1 (B) { }
static void fn2 (C) { }
};
} D;
void foo (D) {}
void foo (D::A) {}
void foo (D::B) {}
void foo (D::C) {}
void *p = (void *) D::C::fn1;
void *q = (void *) D::C::fn2;
which is still rejected even with this patch?
error: anonymous type with no linkage used to declare function ‘static
void<anonymous struct>::C::fn1(<anonymous struct>::B)’ with linkage
[-fpermissive]
and similarly for fn2. If typedef struct { is changed to typedef struct D {
on the first line, it compiles just fine and everything is exported.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (5 preceding siblings ...)
2013-01-04 17:08 ` jakub at gcc dot gnu.org
@ 2013-01-04 20:32 ` jason at gcc dot gnu.org
2013-01-07 16:44 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-04 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-04 20:30:25 UTC ---
Author: jason
Date: Fri Jan 4 20:30:15 2013
New Revision: 194915
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194915
Log:
PR c++/55877
* decl.c (reset_type_linkage, bt_reset_linkage): New.
(grokdeclarator): Use reset_type_linkage.
* name-lookup.c (binding_table_foreach): Handle null table.
* tree.c (decl_anon_ns_mem_p): Check TYPE_MAIN_DECL, not TYPE_NAME.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/ext/visibility/anon11.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/decl.c
branches/gcc-4_6-branch/gcc/cp/name-lookup.c
branches/gcc-4_6-branch/gcc/cp/tree.c
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (6 preceding siblings ...)
2013-01-04 20:32 ` jason at gcc dot gnu.org
@ 2013-01-07 16:44 ` jason at gcc dot gnu.org
2013-02-08 15:06 ` [Bug c++/55877] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2013-01-07 16:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2013-01-07 16:43:55 UTC ---
(In reply to comment #4)
> BTW, what about:
> typedef struct {
> typedef enum { X, Y } A;
> typedef struct { } B;
> struct C {
> static void fn1 (B) { }
> static void fn2 (C) { }
> };
> } D;
Hmm, yes, that's still a regression from 4.4.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.6/4.7/4.8 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (7 preceding siblings ...)
2013-01-07 16:44 ` jason at gcc dot gnu.org
@ 2013-02-08 15:06 ` rguenth at gcc dot gnu.org
2013-04-12 15:15 ` [Bug c++/55877] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-08 15:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Priority|P3 |P2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (8 preceding siblings ...)
2013-02-08 15:06 ` [Bug c++/55877] [4.6/4.7/4.8 " rguenth at gcc dot gnu.org
@ 2013-04-12 15:15 ` jakub at gcc dot gnu.org
2014-01-23 10:33 ` paolo.carlini at oracle dot com
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.6.4 |4.7.4
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:15:18 UTC ---
GCC 4.6.4 has been released and the branch has been closed.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (9 preceding siblings ...)
2013-04-12 15:15 ` [Bug c++/55877] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2014-01-23 10:33 ` paolo.carlini at oracle dot com
2014-01-23 10:36 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-23 10:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Can we close this?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (10 preceding siblings ...)
2014-01-23 10:33 ` paolo.carlini at oracle dot com
@ 2014-01-23 10:36 ` jakub at gcc dot gnu.org
2014-02-25 21:19 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-01-23 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
No, the #c4 testcase is still a regression from 4.4, verified using latest
trunk.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (11 preceding siblings ...)
2014-01-23 10:36 ` jakub at gcc dot gnu.org
@ 2014-02-25 21:19 ` jason at gcc dot gnu.org
2014-02-25 21:19 ` jason at gcc dot gnu.org
2014-02-27 16:21 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-25 21:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
Target Milestone|4.7.4 |4.9.0
--- Comment #11 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 4.9.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (12 preceding siblings ...)
2014-02-25 21:19 ` jason at gcc dot gnu.org
@ 2014-02-25 21:19 ` jason at gcc dot gnu.org
2014-02-27 16:21 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-25 21:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #10 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Feb 25 21:19:06 2014
New Revision: 208157
URL: http://gcc.gnu.org/viewcvs?rev=208157&root=gcc&view=rev
Log:
PR c++/55877
* decl2.c (no_linkage_error): Handle C++98 semantics.
(reset_type_linkage): Move from decl.c.
(reset_type_linkage_1, reset_type_linkage_2, bt_reset_linkage_1)
(bt_reset_linkage_2, reset_decl_linkage): New.
(tentative_decl_linkage): Factor out of expand_or_defer_fn_1.
(cp_write_global_declarations): Move condition into no_linkage_error.
* decl.c (grokfndecl, grokvardecl): Use no_linkage_error.
* semantics.c (expand_or_defer_fn_1): Factor out
tentative_decl_linkage.
* cp-tree.h: Adjust.
Added:
trunk/gcc/testsuite/g++.dg/abi/anon2.C
trunk/gcc/testsuite/g++.dg/abi/anon3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/decl2.c
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
trunk/gcc/testsuite/g++.old-deja/g++.other/anon9.C
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/55877] [4.7/4.8/4.9 Regression] Anon visibility issues
2013-01-04 15:14 [Bug c++/55877] New: [4.6/4.7/4.8 Regression] Anon visibility issues jakub at gcc dot gnu.org
` (13 preceding siblings ...)
2014-02-25 21:19 ` jason at gcc dot gnu.org
@ 2014-02-27 16:21 ` jason at gcc dot gnu.org
14 siblings, 0 replies; 16+ messages in thread
From: jason at gcc dot gnu.org @ 2014-02-27 16:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55877
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Feb 27 16:20:59 2014
New Revision: 208200
URL: http://gcc.gnu.org/viewcvs?rev=208200&root=gcc&view=rev
Log:
PR c++/60353
PR c++/55877
* decl2.c (tentative_decl_linkage): Don't mess with functions that
are not yet defined.
Added:
trunk/gcc/testsuite/g++.dg/other/anon6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
^ permalink raw reply [flat|nested] 16+ messages in thread