new
authorJason Merrill <jason@gcc.gnu.org>
Tue, 26 May 1998 11:43:44 +0000 (07:43 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 26 May 1998 11:43:44 +0000 (07:43 -0400)
From-SVN: r20060

gcc/testsuite/g++.old-deja/g++.ns/anon1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.ns/invalid1.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/typedef2.C [new file with mode: 0644]
gcc/testsuite/g++.old-deja/g++.other/typedef3.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.ns/anon1.C b/gcc/testsuite/g++.old-deja/g++.ns/anon1.C
new file mode 100644 (file)
index 0000000..c4a242a
--- /dev/null
@@ -0,0 +1,12 @@
+namespace{
+  void f();
+}
+
+int main()
+{
+  f();
+}
+
+namespace{
+  void f(){}
+}
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C b/gcc/testsuite/g++.old-deja/g++.ns/invalid1.C
new file mode 100644 (file)
index 0000000..76d3d70
--- /dev/null
@@ -0,0 +1,12 @@
+//Build don't link:
+namespace x { };
+
+void f(int);
+
+int main()
+{
+        x();   // ERROR - calling a namespace
+        x=4;   // ERROR - assigning to a namespace
+       f(x);  // ERROR - passing a namespace as parameter
+}
+
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef2.C b/gcc/testsuite/g++.old-deja/g++.other/typedef2.C
new file mode 100644 (file)
index 0000000..b12ed13
--- /dev/null
@@ -0,0 +1,10 @@
+//Build don't link:
+struct S{
+
+  static const int i;
+  static const int j;
+};
+
+typedef S T;
+const int T::i = 4;
+const int T::j = 4;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef3.C b/gcc/testsuite/g++.old-deja/g++.other/typedef3.C
new file mode 100644 (file)
index 0000000..465e9a0
--- /dev/null
@@ -0,0 +1,14 @@
+//Build don't link:
+template<class T>
+struct X{
+  T v;
+  X(){}
+  virtual ~X(){}
+  virtual inline T f(T x){return x;}
+};
+
+void f()
+{
+  typedef int H;
+  X<H> y;
+}