Still broken: g++ frontend bug in egcs-1.1 and mainline
Klaus-Georg Adams
Klaus-Georg.Adams@chemie.uni-karlsruhe.de
Wed Sep 9 04:04:00 GMT 1998
The g++ bug I complained about in
http://www.cygnus.com/ml/egcs-patches/1998-Jul/0115.html
is still broken in egcs-1.1 and in the mainline. I append the testcase
again for reference (it's not in the testsuite yes).
It 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;
+}
More information about the Gcc-bugs
mailing list