🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

2.2.2 on rs6000: new[0]

#141
From: Doug Moore
Date: Sun, 02 Aug 1992 20:10
37 lines
1829 bytes
Attempting to allocate a zero-sized array on an rs6000 model 550
results in a runtime error.  This is aix3.2, with the patched
assembler.  g++ 2.2.2 with many patches off the net (although the
problem has been around for a while, before 2.2.2 even).

In quick succession, the verbose compile, the run, and the source
follow.

Doug Moore
(dougm@cs.rice.edu)


<masc41>:dougm % g++ -v -Wall junk.cc
Reading specs from /import/blossom/lib/gcc-lib/rs6000/2.2.2/specs
gcc version 2.2.2
 /import/blossom/lib/gcc-lib/rs6000/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -
D__GNUG__=2 -D__cplusplus -D_IBMR2 -D_AIX -D___IBMR2__ -D___AIX__ -D___IBMR2 -D_
__AIX -D__CHAR_UNSIGNED__ -Wall junk.cc /tmp/ccJo4Daw.i
GNU CPP version 2.2.2
 /import/blossom/lib/gcc-lib/rs6000/2.2.2/cc1plus /tmp/ccJo4Daw.i -quiet -dumpba
se junk.cc -Wall -version -o /tmp/ccJo4Daw.s
GNU C++ version 2.2.2 compiled by GNU C version 2.2.2.
junk.cc: In function `int  main ()':
junk.cc:4: warning: unused variable `p'
 as -u -o junk.o /tmp/ccJo4Daw.s
 /import/blossom/lib/gcc-lib/rs6000/2.2.2/ld -T512 -H512 -btextro -bhalt:4 -bnod
elcsect /lib/crt0.o -L/import/blossom/lib/gcc-lib/rs6000/2.2.2 -L/import/blossom
/lib junk.o -lg++ /import/blossom/lib/gcc-lib/rs6000/2.2.2/libgcc.a -lc /import/
blossom/lib/gcc-lib/rs6000/2.2.2/libgcc.a
<masc41>:dougm % a.out
Virtual memory exceeded in `new'
<masc41>:dougm % cat junk.cc
main()
{
  int x = 0;
  int* p = new int[x];
}
Technical Details
Message-ID: <9208022010.AA07155@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: 2.2.2 on rs6000: new[0]
Message-ID: <9208022010.AA07155@cs.rice.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Sun, 2 Aug 1992 20:10:21 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 38