This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH: PR 21908
Paolo Bonzini wrote:
> you can test for
>
> { dg-error "der\\(\\)" } { dg-bogus "der\\(const void \\*\\*\\)" }
Thanks! I forgot about dg-bogus...
Here's the version I checked in. Tested by running the test with and
without the patch; commited on 4.0 branch and mainline.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304
2005-10-19 Mark Mitchell <mark@codesourcery.com>
PR c++/21908
* g++.dg/parse/error28.C: New test.
Index: gcc/testsuite/g++.dg/parse/error28.C
===================================================================
RCS file: gcc/testsuite/g++.dg/parse/error28.C
diff -N gcc/testsuite/g++.dg/parse/error28.C
*** /dev/null 1 Jan 1970 00:00:00 -0000
--- gcc/testsuite/g++.dg/parse/error28.C 19 Oct 2005 20:28:52 -0000
***************
*** 0 ****
--- 1,10 ----
+ // PR c++/21908
+
+ struct virt { virt () {} virt (int i) {} };
+ struct der : public virtual virt { // { dg-error "der" }
+ der (int i) : virt(i) {} // { dg-error "der" }
+ };
+ struct top : public der {
+ // { dg-error "der\\(\\)" "" { target *-*-* } 9 }
+ top () {} // { dg-bogus "der\\(const" }
+ };