summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tc1/dr135.C
blob: beed8cdfd7fa3df0501a98123a5b8691c336b996 (plain)
1
2
3
4
5
6
7
8
// { dg-do compile }
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
// DR135: Class type in in-class member function definitions 

struct S {
  S f() { return S(); }  // { dg-bogus "" "incomplete class type is allowed as return type" }
  void g(S) { }          // { dg-bogus "" "incomplete class type is allowed as parameter type" }
};