🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

BUG in G++ 1.32.0 - c++ get segmentation violation

#1643
From: Ron Guilmette
Date: Sun, 22 Jan 1989 21:28
21 lines
1222 bytes
I thought that I would try something tricky and see if I could
redefine the sizeof operator.  I ran the following code thru
G++ 1.32.0 and it got a segmentation violation in c++.

There are two issues here.  First, it's obvious that the segmentation
violation shouldn't occur.  Second, I think that allowing the sizeof
operator to be redefined would be a nice feature, and consistant
with the general philosophy of letting all operators be redefined.

What does cfront (1.2/2.0) do with this code?

class test {
public:
	virtual operator sizeof();
};

// Ron Guilmette  -  MCC  -  Experimental (parallel) Systems Kit Project
// 3500 West Balcones Center Drive,  Austin, TX  78759  -  (512)338-3740
// ARPA: rfg@mcc.com
// UUCP: {ihnp4,seismo,ucb-vax,gatech}!cs.utexas.edu!pp!rfg
Technical Details
Message-ID: <8901222128.AA01734@riunite.aca.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!texbell!bigtex!milano!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!rfg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!texbell!bigtex!milano!cs.utexas.edu!tut.cis.ohio-state.edu!MCC.COM!rfg
From: rfg@MCC.COM (Ron Guilmette)
Newsgroups: gnu.g++.bug
Subject: BUG in G++ 1.32.0 - c++ get segmentation violation
Message-ID: <8901222128.AA01734@riunite.aca.mcc.com>
Date: 22 Jan 89 21:28:32 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 21