defn in friend decl ?

David C Binderman dcb@pncl.co.uk
Sun Nov 15 09:34:00 GMT 1998


Hello there,

My understanding is that the following is not legal C++ code.

struct A
{
	friend struct B { 	// defn in friend decl ?
		int i;
	};
};

However, egcs-981109 on RedHat Linux 5.1 on Alpha EV5.6 compiles the
code fine, even with flags -ansi -pedantic -Wall

Regards

David C Binderman MSc BSc	+44 1293 534847		dcb@pncl.co.uk




More information about the Gcc-bugs mailing list