repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
c++: constantness of call to function pointer [PR111703]
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
covariant22.C
blob
9826f9d01285e51cbbb0106cc43b1e9fc0a6007a
1
// PR c++/85068
2
// { dg-do compile }
3
4
struct A;
5
6
struct B
7
{
8
virtual A *foo (); // { dg-message "overridden" }
9
};
10
11
struct C : virtual B
12
{
13
virtual C *foo (); // { dg-error "invalid covariant return type for" }
14
};
15
16
struct D : C
17
{
18
virtual C *foo ();
19
};