diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C b/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C new file mode 100644 index 000000000..22c2b0eb6 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/inherit/covariant19.C @@ -0,0 +1,14 @@ +// PR c++/46220 +// According to the letter of the standard this is invalid, +// but that seems like a bug. + +class Baz; +class Foo { +public: + virtual const Baz* getBaz() = 0; +}; +class Bar : public Foo { +public: + Baz* getBaz(); +}; + |