[Bug c++/60417] [DR 1518] Bogus error on C++03 aggregate initialization
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Mar 5 09:13:00 GMT 2014
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.
More information about the Gcc-bugs
mailing list