🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: 2.2.2 on rs6000: new[0] - gnu.g++.bug #4579

#156
From: Doug Moore
Date: Tue, 04 Aug 1992 07:18
18 lines
1124 bytes
>>>>> On 3 Aug 92 01:16:23 GMT, tmcconne@sedona.intel.com (Tom McConnell) said:
Tom>   This is not a bug in gcc. This is the expected behaviour from a call to malloc
Tom> with size = 0 in AIX 3.2.

While I am grateful for Mr. McConnell's informative reply (and his
general helpfulness to the rs6000ites of the world), I must correct
him this time.

No, it's not a bug in gcc.  It is a bug in g++, though.  According to
the Annotated C++ Reference Manual, Ellis and Stroustrup, section
5.3.3, page 59:

"This implies that an operator new() can be called with the argument
zero.  In this case, a pointer to an object is returned.  Repeated
such calls return pointers to distinct objects."

Doug Moore
(dougm@cs.rice.edu)
Technical Details
Message-ID: <9208040718.AA10838@cs.rice.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm
From: dougm@cs.rice.edu (Doug Moore)
Subject: Re: 2.2.2 on rs6000: new[0] - gnu.g++.bug #4579
Message-ID: <9208040718.AA10838@cs.rice.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 4 Aug 1992 07:18:43 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 19