public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization
@ 2014-03-04 21:14 jason at gcc dot gnu.org
2014-03-04 21:14 ` [Bug c++/60417] " jason at gcc dot gnu.org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-03-04 21:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Bug ID: 60417
Summary: [4.9 regression] [DR 1518] Bogus error on C++03
aggregate initialization
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jason at gcc dot gnu.org
Depends on: 54835
This testcase is valid C++98, but we've started to reject it since the patch
for 54835.
struct A { explicit A(int = 0); };
struct B { A a; };
int main()
{
B b = {};
}
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
@ 2014-03-04 21:14 ` jason at gcc dot gnu.org
2014-03-04 21:36 ` redi at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-03-04 21:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-03-04
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
Target Milestone|--- |4.9.0
Ever confirmed|0 |1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
2014-03-04 21:14 ` [Bug c++/60417] " jason at gcc dot gnu.org
@ 2014-03-04 21:36 ` redi at gcc dot gnu.org
2014-03-04 22:16 ` jason at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2014-03-04 21:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |redi at gcc dot gnu.org
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 60416 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
2014-03-04 21:14 ` [Bug c++/60417] " jason at gcc dot gnu.org
2014-03-04 21:36 ` redi at gcc dot gnu.org
@ 2014-03-04 22:16 ` jason at gcc dot gnu.org
2014-03-05 7:17 ` [Bug c++/60417] " jakub at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-03-04 22:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Tue Mar 4 22:16:12 2014
New Revision: 208333
URL: http://gcc.gnu.org/viewcvs?rev=208333&root=gcc&view=rev
Log:
PR c++/60417
* typeck2.c (process_init_constructor_record): Set
CONSTRUCTOR_IS_DIRECT_INIT on {} for omitted initializers.
Added:
trunk/gcc/testsuite/g++.dg/init/explicit1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck2.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (2 preceding siblings ...)
2014-03-04 22:16 ` jason at gcc dot gnu.org
@ 2014-03-05 7:17 ` jakub at gcc dot gnu.org
2014-03-05 7:24 ` daniel.kruegler at googlemail dot com
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-05 7:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Summary|[4.9 regression] [DR 1518] |[DR 1518] Bogus error on
|Bogus error on C++03 |C++03 aggregate
|aggregate initialization |initialization
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
No longer a regression. Don't know if you don't want to keep this open until
you discuss this in the language committee.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (3 preceding siblings ...)
2014-03-05 7:17 ` [Bug c++/60417] " jakub at gcc dot gnu.org
@ 2014-03-05 7:24 ` daniel.kruegler at googlemail dot com
2014-03-05 9:13 ` redi at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2014-03-05 7:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #4 from Daniel Krügler <daniel.kruegler at googlemail dot com> ---
I have submitted a request to the core group for clarification, but personally
I believe that the intention is clearly to never implicitly-declare an explicit
default constructor, just as we have the same rule for copy/move consttructors.
>From gcc-bugs-return-445440-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Mar 05 07:57:49 2014
Return-Path: <gcc-bugs-return-445440-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25453 invoked by alias); 5 Mar 2014 07:57:48 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25382 invoked by uid 48); 5 Mar 2014 07:57:43 -0000
From: "aoliva at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/60381] [4.9 Regression] ICE: in vt_expand_var_loc_chain, at var-tracking.c:8245
Date: Wed, 05 Mar 2014 07:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: aoliva at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: aoliva at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on component assigned_to everconfirmed
Message-ID: <bug-60381-4-6ZWzxod2FZ@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60381-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60381-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-03/txt/msg00309.txt.bz2
Content-length: 1112
http://gcc.gnu.org/bugzilla/show_bug.cgi?id`381
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-03-05
Component|middle-end |debug
Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Mine. Wow, I didn't see that one coming. I thought we only have links from
preserved values to other preserved values, but this proves this is not the
case. A reversal of 208220 will certainly fix that, but I'm assessing the
impact of that on the pr59992 fix, and looking into combining the two table
cleanups at cselib_reset_table into a single pass. I have a hunch there's some
remaining complexity from back when we actually visited each insn twice and had
to roll back cselib table changes.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (4 preceding siblings ...)
2014-03-05 7:24 ` daniel.kruegler at googlemail dot com
@ 2014-03-05 9:13 ` redi at gcc dot gnu.org
2014-03-05 9:36 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: redi at gcc dot gnu.org @ 2014-03-05 9:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think Daniel's question is tangential because the testcase can be modified
like so:
B b{};
Or like so:
struct A { explicit A(int = 0); };
struct B { int i; A a; };
int main()
{
B b = { 1 };
}
Now whether B has an explicit default ctor is irrelevant. This bug is about
whether the missing initializer-clause for b.a is equivalent to {} or A{}, and
as I said in PR 60416, [dcl.init.aggr]/7 has an example indicating that the
answer is A{}, so I think the testcase is clearly valid, whatever the
resolution of DR 1518 or Daniel's question.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (5 preceding siblings ...)
2014-03-05 9:13 ` redi at gcc dot gnu.org
@ 2014-03-05 9:36 ` rguenth at gcc dot gnu.org
2014-08-02 0:52 ` jason at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-05 9:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.9.0 |---
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (6 preceding siblings ...)
2014-03-05 9:36 ` rguenth at gcc dot gnu.org
@ 2014-08-02 0:52 ` jason at gcc dot gnu.org
2014-08-07 1:45 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-02 0:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sat Aug 2 00:52:09 2014
New Revision: 213511
URL: https://gcc.gnu.org/viewcvs?rev=213511&root=gcc&view=rev
Log:
PR c++/60417
* init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
init-list for trailing elements.
* typeck2.c (process_init_constructor_array): Likewise.
Added:
trunk/gcc/testsuite/g++.dg/init/explicit2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
trunk/gcc/cp/typeck2.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (7 preceding siblings ...)
2014-08-02 0:52 ` jason at gcc dot gnu.org
@ 2014-08-07 1:45 ` jason at gcc dot gnu.org
2014-08-20 1:17 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-07 1:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Thu Aug 7 01:44:11 2014
New Revision: 213689
URL: https://gcc.gnu.org/viewcvs?rev=213689&root=gcc&view=rev
Log:
PR c++/60417
* init.c (build_vec_init): Reorganize earlier change a bit.
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/init.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (8 preceding siblings ...)
2014-08-07 1:45 ` jason at gcc dot gnu.org
@ 2014-08-20 1:17 ` jason at gcc dot gnu.org
2015-06-15 16:03 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2014-08-20 1:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Wed Aug 20 01:16:31 2014
New Revision: 214205
URL: https://gcc.gnu.org/viewcvs?rev=214205&root=gcc&view=rev
Log:
PR c++/60417
* init.c (build_vec_init): Set CONSTRUCTOR_IS_DIRECT_INIT on
init-list for trailing elements.
* typeck2.c (process_init_constructor_array): Likewise.
Added:
branches/gcc-4_9-branch/gcc/testsuite/g++.dg/init/explicit2.C
Modified:
branches/gcc-4_9-branch/gcc/cp/ChangeLog
branches/gcc-4_9-branch/gcc/cp/init.c
branches/gcc-4_9-branch/gcc/cp/typeck2.c
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (9 preceding siblings ...)
2014-08-20 1:17 ` jason at gcc dot gnu.org
@ 2015-06-15 16:03 ` jason at gcc dot gnu.org
2015-10-24 2:58 ` jason at gcc dot gnu.org
2015-10-24 3:01 ` jason at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2015-06-15 16:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
Bug 60417 depends on bug 54835, which changed state.
Bug 54835 Summary: [C++11][DR 1518] Explicit default constructors not respected during copy-list-initialization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54835
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |SUSPENDED
Resolution|FIXED |---
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (10 preceding siblings ...)
2015-06-15 16:03 ` jason at gcc dot gnu.org
@ 2015-10-24 2:58 ` jason at gcc dot gnu.org
2015-10-24 3:01 ` jason at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2015-10-24 2:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #12 from Jason Merrill <jason at gcc dot gnu.org> ---
Author: jason
Date: Sat Oct 24 02:58:10 2015
New Revision: 229283
URL: https://gcc.gnu.org/viewcvs?rev=229283&root=gcc&view=rev
Log:
DR 1518
DR 1630
PR c++/54835
PR c++/60417
* call.c (convert_like_real): Value-initialization can't use
explicit constructors in C++11 and up.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/explicit10.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/g++.dg/cpp0x/initlist40.C
trunk/gcc/testsuite/g++.dg/init/explicit1.C
trunk/gcc/testsuite/g++.dg/init/explicit2.C
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
` (11 preceding siblings ...)
2015-10-24 2:58 ` jason at gcc dot gnu.org
@ 2015-10-24 3:01 ` jason at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu.org @ 2015-10-24 3:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417
--- Comment #13 from Jason Merrill <jason at gcc dot gnu.org> ---
Following discussions of DR1518/1630 in Kona, the testcase is now ill-formed in
C++11 and up.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-10-24 3:01 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-04 21:14 [Bug c++/60417] New: [4.9 regression] [DR 1518] Bogus error on C++03 aggregate initialization jason at gcc dot gnu.org
2014-03-04 21:14 ` [Bug c++/60417] " jason at gcc dot gnu.org
2014-03-04 21:36 ` redi at gcc dot gnu.org
2014-03-04 22:16 ` jason at gcc dot gnu.org
2014-03-05 7:17 ` [Bug c++/60417] " jakub at gcc dot gnu.org
2014-03-05 7:24 ` daniel.kruegler at googlemail dot com
2014-03-05 9:13 ` redi at gcc dot gnu.org
2014-03-05 9:36 ` rguenth at gcc dot gnu.org
2014-08-02 0:52 ` jason at gcc dot gnu.org
2014-08-07 1:45 ` jason at gcc dot gnu.org
2014-08-20 1:17 ` jason at gcc dot gnu.org
2015-06-15 16:03 ` jason at gcc dot gnu.org
2015-10-24 2:58 ` jason at gcc dot gnu.org
2015-10-24 3:01 ` jason at gcc dot gnu.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).