X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.jason%2Ftemporary2.C;fp=gcc%2Ftestsuite%2Fg%2B%2B.old-deja%2Fg%2B%2B.jason%2Ftemporary2.C;h=0000000000000000000000000000000000000000;hb=6fed43773c9b0ce596dca5686f37ac3fc0fa11c0;hp=36c8e8e5d5be3d9962f3b4ce95b884d31fe9bbde;hpb=27b11d56b743098deb193d510b337ba22dc52e5c;p=msp430-gcc.git 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 36c8e8e5..00000000 --- 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. -}