From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14889 invoked by alias); 5 Mar 2014 09:13:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 14658 invoked by uid 48); 5 Mar 2014 09:12:59 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization Date: Wed, 05 Mar 2014 09:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jason at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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/msg00316.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60417 --- Comment #5 from Jonathan Wakely --- 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.