aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/temporary2.C')
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/temporary2.C17
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C
index ea80a3fa6b9..b02dd1dad86 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C
@@ -1,16 +1 @@
-class X // Indentation has been done so to see the similarities.
-{
-public:
- X() {} // ERROR - referenced below
- X(X& x) {x.i=7;} // ERROR - Both functions modify the
- void bar(X& x) {x.i=7;} // ERROR - reference parameter x.
- int i;
-};
-
-X foo() { X x; return x; }
-
-main()
-{
- X x(foo()); // ERROR - Compiler doesn't warn about temporary reference.
- x.bar(foo()); // ERROR - The same mistake is warned about in this case.
-}
+int main()