This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch PING] PR 31446 (+ 28639, 30299)
- From: Paolo Carlini <pcarlini at suse dot de>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 17 Oct 2007 00:43:23 +0200
- Subject: Re: [C++ Patch PING] PR 31446 (+ 28639, 30299)
- References: <4714842A.8030107@suse.de> <47151F72.4040907@codesourcery.com>
Mark Mitchell wrote:
> OK.
>
Thanks, committed. I have also added the testcases from PR 28639 and 30299.
Paolo.
/////////////////
2007-10-16 Paolo Carlini <pcarlini@suse.de>
PR c++/28639
PR c++/30299
* g++.dg/template/void12.C: New.
* g++.dg/template/void13.C: New.
Index: g++.dg/template/void12.C
===================================================================
--- g++.dg/template/void12.C (revision 0)
+++ g++.dg/template/void12.C (revision 0)
@@ -0,0 +1,7 @@
+// PR c++/28639
+
+template<void> struct A // { dg-error "not a valid type" }
+{
+ static const int i = 1;
+ char a[i];
+};
Index: g++.dg/template/void13.C
===================================================================
--- g++.dg/template/void13.C (revision 0)
+++ g++.dg/template/void13.C (revision 0)
@@ -0,0 +1,11 @@
+// PR c++/30299
+
+struct A
+{
+ int i;
+};
+
+template<void> struct B : A // { dg-error "not a valid type" }
+{
+ B() { this->i; }
+};