Hi,
both issues already fixed. Committed to mainline.
Thanks,
Paolo.
/////////////////////
2013-05-24 Paolo Carlini <[email protected]>
PR c++/26572
* g++.dg/template/error51.C: New.
2013-05-24 Paolo Carlini <[email protected]>
PR c++/25503
* g++.dg/template/bitfield2.C: New.
Index: g++.dg/template/bitfield2.C
===================================================================
--- g++.dg/template/bitfield2.C (revision 0)
+++ g++.dg/template/bitfield2.C (working copy)
@@ -0,0 +1,16 @@
+// 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;
+}
Index: g++.dg/template/error51.C
===================================================================
--- g++.dg/template/error51.C (revision 0)
+++ g++.dg/template/error51.C (working copy)
@@ -0,0 +1,9 @@
+// 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>();