diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.jason/temporary2.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.jason/temporary2.C | 16 |
1 files changed, 0 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 deleted file mode 100644 index 36c8e8e5d5b..00000000000 --- a/gcc/testsuite/g++.old-deja/g++.jason/temporary2.C +++ /dev/null @@ -1,16 +0,0 @@ -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; } - -int 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. -} |