This is the mail archive of the gcc-bugs@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]

egcs-980525 gets private scope wrong ?



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++



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