summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tc1/dr135.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/tc1/dr135.C')
-rw-r--r--gcc/testsuite/g++.dg/tc1/dr135.C8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/tc1/dr135.C b/gcc/testsuite/g++.dg/tc1/dr135.C
new file mode 100644
index 000000000..beed8cdfd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tc1/dr135.C
@@ -0,0 +1,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" }
+};