🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Rik Thu, 06 Aug 1992 15:52
Bug report for g++-2.1
#286
Author: 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. :-)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads