🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Severe problem with gcc-2.3.[23], conversions and assignment operators

#1206
From: Peter Schauer
Date: Mon, 04 Jan 1993 00:29
36 lines
1288 bytes
The following program causes gcc-2.3.[23] to go into an infinite loop
on all platforms till virtual memory is exhausted.
If the assignment operator function is removed, it compiles ok.
If the copy constructor is removed and the assignment operator is kept,
the following warning is issued:
crashme.C: In function `void  crashme ()':
crashme.C: too many arguments for constructor `V'

gcc-2.3.1 and earlier compiles ok in all cases.

class M;
class V
{
public:
	V ();
	V (const V&);
	V& operator = (const V&);
};
class M
{
public:
	M ();
	operator V ();
	M some_func (void);
};
void
crashme (void)
{
	V v;
	M m;

	v = m.some_func();
}

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de
Technical Details
Message-ID: <93Jan3.232955met.20493@rebus.regent.e-technik.tu-muenchen.de>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!regent.e-technik.tu-muenchen.dbp.DE!Peter.Schauer

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!regent.e-technik.tu-muenchen.dbp.DE!Peter.Schauer
From: Peter.Schauer@regent.e-technik.tu-muenchen.dbp.DE (Peter Schauer)
Subject: Severe problem with gcc-2.3.[23], conversions and assignment operators
Message-ID: <93Jan3.232955met.20493@rebus.regent.e-technik.tu-muenchen.de>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Mon, 4 Jan 1993 00:29:48 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 37