🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #124

g++ 2.1 does not allow constructors to be friends

#124
From: Jason Merrill
Date: Fri, 03 Apr 1992 01:08
24 lines
1133 bytes
Compiling this code from Object.h in the NIHCL 3.0 library:

...
class Class : public VIRTUAL Object {	// class descriptor object 
private:			// static member variables
...
	friend Object::Object(OIOin&);
	friend Object::Object(OIOifd&);
...

produces these warnings:

Object.h:365: warning: constructors cannot be declared virtual or friend
Object.h:366: warning: constructors cannot be declared virtual or friend

I assume that this was intended to prevent class Object from declaring
Object::Object to be a friend, rather than to prevent class Class from
doing so.

This error is on line 7172 of cp-decl.c

--
Jason Merrill
jason@jarthur.claremont.edu
Technical Details
Message-ID: <1992Apr3.010858.19168@muddcs.claremont.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!jarthur.claremont.edu!jason

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!jarthur.claremont.edu!jason
From: jason@jarthur.claremont.edu (Jason Merrill)
Subject: g++ 2.1 does not allow constructors to be friends
Message-ID: <1992Apr3.010858.19168@muddcs.claremont.edu>
Sender: gnulists@ai.mit.edu
Organization: Harvey Mudd College
Distribution: gnu
Date: Fri, 3 Apr 1992 01:08:58 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 25