2 more C++ testcases

Neil Booth neilb@earthling.net
Sat Dec 2 10:20:00 GMT 2000


>From fixed PRs.

Neil.

	* g++.old-deja/g++.other/externC4.C,
	g++.old-deja/g++.other/friend10.C: New tests.

Index: g++.other/externC4.C
===================================================================
RCS file: externC4.C
diff -N externC4.C
--- /dev/null	Tue May  5 13:32:27 1998
+++ externC4.C	Sat Dec  2 10:19:20 2000
@@ -0,0 +1,14 @@
+// Build don't link:
+// Origin: Neil Booth, from PR #66
+
+extern "C"
+{
+  class foo
+  {
+  public:
+    ~foo ();
+    void bar (foo *);
+    foo ();
+  };
+}
+
Index: g++.other/friend10.C
===================================================================
RCS file: friend10.C
diff -N friend10.C
--- /dev/null	Tue May  5 13:32:27 1998
+++ friend10.C	Sat Dec  2 10:19:20 2000
@@ -0,0 +1,30 @@
+// Build don't link:
+// Origin: Neil Booth, from PR #78
+
+namespace MySpace
+ {
+   class Tag1 { };
+   class Tag2 { };
+
+   template<class Tag>
+   class Object
+   {
+   public:
+
+     friend void Forgotten(Object const & m) {}
+   };
+
+   typedef Object<Tag1> U1;
+   typedef Object<Tag2> U2;
+
+   void foo()
+   {
+     Forgotten(U1());
+     Forgotten(U2());
+   }
+
+   void bar()
+   {
+     Forgotten(U1());
+   }
+ }


More information about the Gcc-patches mailing list