Debian Codegraph @

gcc/testsuite/g++.dg/tc1/dr135.C

raw
1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR135: Class type in in-class member function definitions
4
5 struct S {
6 S f() { return S(); } // { dg-bogus "" "incomplete class type is allowed as return type" }
7 void g(S) { } // { dg-bogus "" "incomplete class type is allowed as parameter type" }
8 };