Path: utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!PARIS.ICS.UCI.EDU!schmidt%crimee.ics.uci.edu From: schmidt%crimee.ics.uci.edu@PARIS.ICS.UCI.EDU ("Douglas C. Schmidt") Newsgroups: gnu.g++.bug Subject: g++ 1.32 balks at C++ code. Message-ID: <8901022227.aa13099@PARIS.ICS.UCI.EDU> Date: 3 Jan 89 06:24:58 GMT Sender: news@tut.cis.ohio-state.edu Organization: GNUs Not Usenet Lines: 32 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