Article View: gnu.g++.bug
Article #2061Re: new and delete bug report 2
From: Joseph E. Sacco
Date: Fri, 02 Jun 1989 20:17
Date: Fri, 02 Jun 1989 20:17
16 lines
1123 bytes
1123 bytes
I observed the same results on a SUN4 using g++-1.35.1-. The problem
seems to be with the statement "delete[100] res; " If this statement
is replaced by "delete res;" all is well under g++.
This example is quite like the one on page 92 of Bjarne's book. Since you
are not deleting a vector of class objects [see section 5.5.5] the book
suggests "... the vector size provided by the user is ignored ..."
This seems to be the case under Cfront1.2 where your program runs
with or without [100] appended to delete [albeit slower by a factor
of two ].
JOE
Technical Details
Message-ID:
<47@eileen.samsung.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!ames!lll-winken!uunet!ginosko!saccoReferences:
<8905302141.AA13478@life.ai.mit.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!bionet!ames!lll-winken!uunet!ginosko!sacco From: sacco@eileen.samsung.com (Joseph E. Sacco) Newsgroups: gnu.g++.bug Subject: Re: new and delete bug report 2 Summary: delete bug also observed in g++-1.35- on SUN4 OS4.0.1 Message-ID: <47@eileen.samsung.com> Date: 2 Jun 89 20:17:05 GMT References: <8905302141.AA13478@life.ai.mit.edu> Distribution: gnu Organization: Mitchell and Gauthier Associates Lines: 16