🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

g++ 2.2.2 problem with operator delete

#992
From: Marc Beaulieu
Date: Tue, 29 Sep 1992 16:20
40 lines
1594 bytes
    There seems to be a bug in g++.  It doesn't handle a class-specific
 delete operator with a size parameter.  You can declare the operator,
 but then when you try to delete an object you get a compile error.

 We are running g++ 2.2.2 on a sparc running SUN-OS 4.1.
 gcc was configure with "sun4"

 Here's an example:
 
    lammbrau 1 ~ 91) g++ -c x.c
    x.c: In function `int  main ()':
    x.c:11: too few arguments for method `operator delete'
    cp-method.c:2217: failed assertion `rval != error_mark_node'
    /usr/local/bin/gcc: Internal compiler error: program cc1plus got fatal signal 6
 
    lammbrau 1 ~ 92) CC -c x.c
    "x.c", line 3: warning: X  has X::operator delete() but no operator new()
 
    lammbrau 0 ~ 93) cat x.c
    #include <stddef.h>
 
    class X {
    public:
       void operator delete(void*, size_t);
    };
 
    int main()
    {
       X* x = new X;
       delete x;
       return 0;
    }
 
 
 

##############################################
Marc Beaulieu                 Dept. 6s52
Bell-Northern Research, Montreal, Canada.
INTERNET:  mbeaulie@bnr.ca
Technical Details
Message-ID: <9209291617.AA25159@tollys.bnrmtl.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tollys.UUCP!mbeaulie

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tollys.UUCP!mbeaulie
From: mbeaulie@tollys.UUCP (Marc Beaulieu)
Subject: g++ 2.2.2 problem with operator delete
Message-ID: <9209291617.AA25159@tollys.bnrmtl.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 29 Sep 1992 16:20:52 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 41