local classes in egcs 980214 make crash

David C Binderman dcb@pncl.co.uk
Tue Feb 17 10:27:00 GMT 1998


Hello there,

The following code produces an internal compiler error on egcs-980214,
and for most of this year's versions of egcs.

void
f()
{
	class Local_1 { };

	class Local_2 {
		friend class Friend ;
	};

	class Friend {
	public:
		Local_1 * g(Local_2 *)
		{
			return 0;
		}
	};
}

My understanding is that this code should compile ok.

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




More information about the Gcc-bugs mailing list