This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-980525 gets private scope wrong ?
- To: egcs-bugs at cygnus dot com
- Subject: egcs-980525 gets private scope wrong ?
- From: dcb at pncl dot co dot uk (David C Binderman)
- Date: Thu, 28 May 1998 18:53:08 +0100 (BST)
Hello there,
I think this C++ code should compile ok.
class K {
private:
static K qwe;
K();
~K();
};
K K::qwe;
However, egcs-980525 says
p180.cc:9: warning: all member functions in class `K' are private
p180.cc:9: warning: `class K' only defines a private destructor and has no
friends
p180.cc: In function `(static destructors for p180.cc)':
p180.cc:8: Error: `K::~K()' is private
p180.cc:12: Error: within this context
Regards
David Binderman MSc BSc +44 1293 534 847 dcb_AVOID_JUNK_MAIL@pncl.co.uk
There is no substitute for skill, taste and experience when programming
- Dr Stroustrup, inventor of C++