OSDN Git Service

* lib/obj-c++.exp (obj-c++_target_compile): Declare global variable,
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.law / arm12.C
index 89e2a4d..c0332d3 100644 (file)
@@ -1,11 +1,11 @@
-// Build don't link: 
+// { dg-do assemble  }
 // GROUPS passed ARM-compliance
 // arm file
 // From: belley@cae.ca (Benoit Belley 3218)
 // Subject: Bad access control with private constructor and derivation
 // Date: Fri, 28 May 1993 12:39:57 -0400 (EDT)
 
-#include <iostream.h>
+#include <iostream>
 
 class X
 {
@@ -22,19 +22,19 @@ public:
   Y();
 };
 
-X::X()
-{// ERROR - .*
-  cout << "X::X()" << endl;
+X::X() // { dg-error "is private" }
+{
+  std::cout << "X::X()" << std::endl;
 }
 
 void X::f()
 {
-  cout << "X::f()" << endl;
+  std::cout << "X::f()" << std::endl;
 }
 
-Y::Y()
-{// ERROR -  within this
-  cout << "Y::Y()" << endl;
+Y::Y() // { dg-error "within this context" }
+{
+  std::cout << "Y::Y()" << std::endl;
 }
 
 
@@ -45,3 +45,5 @@ int main()
 }
 
 
+
+