This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: New failing g++ test in lastest snapshots.
- To: egcs-patches at cygnus dot com
- Subject: PATCH: New failing g++ test in lastest snapshots.
- From: Klaus-Georg Adams <Klaus-Georg dot Adams at chemie dot uni-karlsruhe dot de>
- Date: Mon, 6 Jul 1998 14:07:38 +0200
The appended test fails with the error message:
/egcs/adams/egcs-cvs/gcc/testsuite/g++.old-deja/g++.robertl/eb134.C: In function `void __tcf_0()':
/egcs/adams/egcs-cvs/gcc/testsuite/g++.old-deja/g++.robertl/eb134.C:7: `a::~a()' is private
/egcs/adams/egcs-cvs/gcc/testsuite/g++.old-deja/g++.robertl/eb134.C:13: within this context
although the point of declaration of the static variable thea is in a
class member.
-- kga
-------------------------------------------------------------------------
Klaus-Georg Adams Email: Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Institut f. Anorg. Chemie, Lehrstuhl II Tel: 49(0)721 608 3485
Universität Karlsruhe, D-76128 Karlsruhe
-------------------------------------------------------------------------
--- /dev/null Mon Jul 18 01:46:18 1994
+++ gcc/testsuite/g++.old-deja/g++.robertl/eb134.C Mon Jul 6 14:05:13 1998
@@ -0,0 +1,15 @@
+// Build don't link:
+// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
+// Reported against EGCS snaps 98/06/28.
+
+class a {
+ friend class just_to_quiet_dumb_warning_I_complained_about_in_another_thread;
+ ~a() {}
+public:
+ static a& get();
+};
+
+a& a::get() {
+ static a thea;
+ return thea;
+}