Thread View: gnu.g++.bug
1 messages
1 total messages
Started by "Douglas C. Schmidt"
Tue, 03 Jan 1989 06:24
g++ 1.32 balks at C++ code.
Author: "Douglas C. Schmidt"
Date: Tue, 03 Jan 1989 06:24
Date: Tue, 03 Jan 1989 06:24
32 lines
1432 bytes
1432 bytes
Hi,
The following example demonstrates an error with g++ 1.32:
----------------------------------------
class X {
public:
static int si;
};
int *pi = &X::si;
----------------------------------------
This should compile and execute correctly ( see bottom page 313 of
the 1988 USENIX C++ Proceedings ). However, g++ complains as follows:
----------------------------------------
g++ version 1.32.0
/usr/public/lib/g++/gcc-cpp -+ -v -I/cd/ua/schmidt/include/ -undef
-D__GNU__ -D__GNUG__ -Dsparc -Dsun -Dunix test.C /tmp/cca17054.cpp
GNU CPP version 1.32
/usr/public/lib/g++/gcc-c++ /tmp/cca17054.cpp -quiet -dumpbase test.C
-fstrength-reduce -finline-functions -fmemoize-lookups -fsave-memoized
-fchar-charconst -noreg -version -o /tmp/cca17054.s
GNU C++ version 1.32.0 (sparc) compiled by GNU C version 1.31.
test.C:6: initialization between incompatible pointer types
----------------------------------------
cfront has no problems with this.
Doug
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