re PR c++/21908 (poor diagnostic with vitrual base classes)

PR c++/21908
	* g++.dg/parse/error28.C: New test.

From-SVN: r105637
This commit is contained in:
Mark Mitchell 2005-10-19 20:32:59 +00:00 committed by Mark Mitchell
parent 6fa05db65c
commit 1d61579ed2
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-10-19 Mark Mitchell <mark@codesourcery.com>
PR c++/21908
* g++.dg/parse/error28.C: New test.
2005-10-19 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/profile-generate-2.c: New test.

View File

@ -0,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" }
};