Commit 99b8202a by Paolo Carlini Committed by Paolo Carlini

re PR c++/26572 (Invalid local class definition not diagnosed)

2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/26572
	* g++.dg/template/error51.C: New.

2013-05-24  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/25503
	* g++.dg/template/bitfield2.C: New.

From-SVN: r199288
parent df09b22c
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/26572
* g++.dg/template/error51.C: New.
2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/25503
* g++.dg/template/bitfield2.C: New.
2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/noinline1.ads: New test.
......
// PR c++/25503
template<int N>
struct Test
{
Test()
{
typedef struct StaticAssert {unsigned condition : (N); } XXX; // { dg-error "zero width" }
}
};
int
main()
{
Test<0> T;
}
// PR c++/26572
template<int> void foo()
{
struct A; // { dg-error "declaration" }
struct B : A {}; // { dg-error "invalid use of incomplete" }
}
template void foo<0>();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment