]> oss.titaniummirror.com Git - msp430-gcc.git/blobdiff - gcc/testsuite/g++.old-deja/g++.jason/temporary2.C
Imported gcc-4.4.3
[msp430-gcc.git] / gcc / testsuite / g++.old-deja / g++.jason / temporary2.C
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 (file)
index 36c8e8e..0000000
+++ /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.
-}