[gnu.g++.bug] g++ 1.32 balks at C++ code.

schmidt%crimee.ics.uci.edu@PARIS.ICS.UCI.EDU ("Douglas C. Schmidt") (01/03/89)

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