This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

2 more C++ testcases


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());
+   }
+ }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]