🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #286

Bug report for g++-2.1

#286
From: Rik
Date: Thu, 06 Aug 1992 15:52
33 lines
1249 bytes
Hi,
  I would like to report a couple of problems I had with the
following program ( cut down somewhat to reveal the error ) :

class Pte {
public :
   int i ;
} ;

class Ptr {
public :
   Pte* p ;
   Pte* operator->() { return p ; }
} ;

int main() {

Ptr y ;
Pte* z = y.operator->() ;     /*  ERRORS GENERATED HERE /*

}

Bug 1 : This generates a compile time 'structure has no member named `' ' error.
        Maybe I'm missing something but I don't think thats right.
Bug 2 : If you replace the line with " Pte* z = operator->() ; " then the
        compiler crashes with fatal signal 1 11.

Thanks !

> Richard Eyre-Todd.  Department of Computer Science, University of Edinburgh.

> Email: ret@uk.ac.ed.dcs                     | Solid fuel is for camp-fires,
> or     ret%dcs.ed.ac.uk@nsfnet-relay.ac.uk  | not boosting Space Shuttles. :-)
Technical Details
Message-ID: <1437.9208061552@carna.dcs.ed.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dcs.edinburgh.ac.UK!ret

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dcs.edinburgh.ac.UK!ret
From: ret@dcs.edinburgh.ac.UK (Rik)
Subject: Bug report for g++-2.1
Message-ID: <1437.9208061552@carna.dcs.ed.ac.uk>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Thu, 6 Aug 1992 15:52:08 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 34