x
authorJason Merrill <jason@yorick.cygnus.com>
Fri, 5 Jun 1998 02:32:42 +0000 (02:32 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 5 Jun 1998 02:32:42 +0000 (22:32 -0400)
From-SVN: r20237

gcc/cp/ChangeLog
gcc/testsuite/g++.old-deja/g++.ns/alias3.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.ns/alias4.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.ns/koenig2.C
gcc/testsuite/g++.old-deja/g++.ns/using3.C
gcc/testsuite/g++.old-deja/g++.other/new2.C

index c340bdb..6456a8e 100644 (file)
@@ -1,3 +1,7 @@
+1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
+
 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
 
        * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/alias3.C b/gcc/testsuite/g++.old-deja/g++.ns/alias3.C
new file mode 100644 (file)
index 0000000..3b8de0c
--- /dev/null
@@ -0,0 +1,30 @@
+namespace A{
+  struct X{};
+  void f(X&);
+  extern int i;
+  namespace a_very_long_namespace_name{
+    int k;
+  }
+}
+
+namespace B = A;
+namespace B = A;
+namespace B = B;
+
+namespace avl = A::a_very_long_namespace_name;
+
+void B::f(A::X& x)
+{
+  B::f(x);
+  f(x);
+  avl::k = 1;
+}
+
+int B::i = 0;
+
+int main()
+{
+  B::X x;
+  if (B::i)
+    A::f(x);
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/alias4.C b/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
new file mode 100644 (file)
index 0000000..16c4dca
--- /dev/null
@@ -0,0 +1,13 @@
+namespace A = B;  // ERROR - unknown namespace
+
+namespace C{}
+namespace D = C;  
+namespace D {     // ERROR - reopening namespace with alias
+  void f();
+}
+
+void C::f(){}     // ERROR - previous definition
+
+void D::f(){}     // ERROR - redefinition
+
+namespace E = C::F; // ERROR - unknown namespace
index c9df60c..629cd38 100644 (file)
@@ -1,9 +1,10 @@
-//Build don't link:
-//Check association of {error} for Koenig lookup
-class QString { };
+// Build don't link:
+// Check association of {error} for Koenig lookup
+// Special g++ Options:
+
+struct QString { operator void * (); };
 int foo()
 {
-       QString bar;
-       if (bar == __null ) {
-    }
+  QString bar;
+  return (bar == __null );
 }
index e179f31..a8c1761 100644 (file)
@@ -1,3 +1,5 @@
+// Build don't link:
+
 typedef        unsigned int atypedef;
 struct astruct{};
 void afunction();
index 6861c4d..88cbe0a 100644 (file)
@@ -8,15 +8,14 @@ struct X{
 };
 
 
-void f(X *x = new X);          // ERROR -
+void f(X *x = new X);          // ERROR - 
 
-void f(X *x = new X(4));       // ERROR -
+void f(X *x = new X(4));       // ERROR - 
 
-void f(X *x = new X[4]);       // ERROR -
+void f(X *x = new X[4]);       // ERROR - 
 
-void f(X *x = new (3) X(6));   // ERROR -
+void f(X *x = new (3) X(6));   // ERROR - 
 
-void f(X *x = new (2) X[10]);  // ERROR -
-
-void f(X *x = new X[10][5]);   // ERROR -
+void f(X *x = new (2) X[10]);  // ERROR - 
 
+void f(X *x = new X[10][5]);   // ERROR -