re PR c++/58328 ([C++11] bogus: error: constructor required before non-static data member for)

2014-09-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/58328
	* g++.dg/cpp0x/nsdmi10.C: New.

From-SVN: r215386
This commit is contained in:
Paolo Carlini 2014-09-19 09:34:14 +00:00 committed by Paolo Carlini
parent b4e9251d1e
commit c9aa0007f8
2 changed files with 23 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-09-19 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58328
* g++.dg/cpp0x/nsdmi10.C: New.
2014-09-19 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.dg/ssp-3.c: New.

View File

@ -0,0 +1,18 @@
// PR c++/58328
// { dg-do compile { target c++11 } }
struct A1 {
struct B1 {
int y1 = 1;
};
A1(const B1& opts = B1()) {} // { dg-error "constructor" }
};
struct A2 {
struct B2 {
int x2, y2 = 1;
};
A2(const B2& opts = B2()) {} // { dg-error "constructor" }
};