Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Doug Schmidt
Thu, 23 Nov 1989 00:50
visibility error with destructors
Author: Doug Schmidt
Date: Thu, 23 Nov 1989 00:50
Date: Thu, 23 Nov 1989 00:50
31 lines
1192 bytes
1192 bytes
The following example illustrates a bug with g++ 1.36.1:
----------------------------------------
#include <stdio.h>
class foo
{
public:
foo () {printf ("foo ()\n");}
private:
~foo () {printf ("~foo ()\n");}
};
main ()
{
foo *bar = new foo;
}
----------------------------------------
g++ complains:
test.c:9: class `foo' only defines a private destructor and has no friends
cfront 2.0 compiles this with no problems.
Doug
--
schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente.
office: (714) 856-4043 | Per me si va nell'eterno dolore.
| Per me si va tra la perduta gente.
| Lasciate ogni speranza o voi ch'entrate.
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