new
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2000 22:24:31 +0000 (22:24 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 18 Feb 2000 22:24:31 +0000 (22:24 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32058 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/g++.old-deja/g++.ns/type1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/access9.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/redecl3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.ns/type1.C b/gcc/testsuite/g++.old-deja/g++.ns/type1.C
new file mode 100644 (file)
index 0000000..21398f9
--- /dev/null
@@ -0,0 +1,18 @@
+// Test that using an elaborated-type-specifier in a namespace to refer
+// to a class outside the namespace does not cause its name to be considered
+// declared in the namespace.
+
+// Contributed by Jason Merrill <jason@cygnus.com>
+// Build don't link:
+
+struct A { };
+
+int A;
+
+namespace N {
+  struct A *f ();
+}
+
+using namespace N;
+
+struct A *a;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/access9.C b/gcc/testsuite/g++.old-deja/g++.other/access9.C
new file mode 100644 (file)
index 0000000..9312653
--- /dev/null
@@ -0,0 +1,10 @@
+// Test that g++ allows friends to use private types in their declarations.
+// Build don't link:
+
+class A {
+  typedef int I;
+  friend I f (I);
+};
+
+A::I f (A::I);
+A::I f (A::I) { return 0; }
diff --git a/gcc/testsuite/g++.old-deja/g++.other/redecl3.C b/gcc/testsuite/g++.old-deja/g++.other/redecl3.C
new file mode 100644 (file)
index 0000000..d2a5fed
--- /dev/null
@@ -0,0 +1,8 @@
+// Bug: g++ thought this was a redeclaration of a local variable.
+// Build don't link:
+
+int i;
+int main ()
+{
+  extern int i;
+}