re PR c++/54812 ([C++11] Delete expression doesn't respect access of defaulted destructor)

2013-10-25  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54812
	* g++.dg/cpp0x/defaulted47.C: New.

From-SVN: r204057
This commit is contained in:
Paolo Carlini 2013-10-25 10:54:56 +00:00 committed by Paolo Carlini
parent 356610cb47
commit 5970573cc1
2 changed files with 21 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54812
* g++.dg/cpp0x/defaulted47.C: New.
2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/pr58831.c: New test.

View File

@ -0,0 +1,16 @@
// PR c++/54812
// { dg-do compile { target c++11 } }
class A
{
A() = default; // { dg-error "private" }
};
A a; // { dg-error "context" }
class B
{
~B() = default; // { dg-error "private" }
};
B b; // { dg-error "context" }