Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Don Kimber EIL
Thu, 17 Aug 1989 01:49
`this' is read-only in 1.36.0-
Author: Don Kimber EIL
Date: Thu, 17 Aug 1989 01:49
Date: Thu, 17 Aug 1989 01:49
34 lines
1376 bytes
1376 bytes
In version 1.36.0- on a Sun 4, running 4.0.1, the program foo.cc
class cl* my_allocater(int size);
void my_free(class cl* ptr);
class cl {
public:
cl() {
this = my_allocater( sizeof(cl) );
};
~cl() {
my_free( this );
this = 0;
};
};
Gets the following errors
% g++ -v foo.cc
g++ version 1.36.0-
/import/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__GNUC__ -D__cplusplus
-Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ foo.cc /tmp/cca02559.cpp
GNU CPP version 1.35.96
/import/lib/gcc-cc1plus /tmp/cca02559.cpp -quiet -dumpbase foo.cc -noreg -versi
on -o /tmp/cca02559.s
GNU C++ version 1.36.0- (sparc) compiled by GNU C version 1.35.96.
default target switches: -mfpu -mepilogue
foo.cc: In method cl::cl ():
foo.cc:7: assignment of read-only parameter `$this'
foo.cc: In method cl::~cl ():
foo.cc:10: assignment of read-only parameter `$this'
Don Kimber
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