Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!decwrl!argosy!becher From: becher@argosy.UUCP (Jonathan D. Becher) Newsgroups: gnu.g++.bug Subject: bug in g++ 1.35.0 -- no fix Keywords: visibility rules Message-ID: <235@argosy.UUCP> Date: 28 Aug 89 22:10:25 GMT Sender: news@argosy.UUCP Organization: we donna need no steeken' organeesazion Lines: 36 We brought up g++ 1.35.0 last week and ran into a series of problems. The only one I wasn't able to work around is the following: The following code incorrectly, I believe, calls the derived method instead of the base class method. Is this still a problem in newer versions? What can I do for a fix? g++ version 1.35.0 /usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dvax -Dunix -D__vax__ -D__unix__ t.cc /tmp/cca04568.cpp GNU CPP version 1.35 /usr/local/lib/gcc-cc1plus /tmp/cca04568.cpp -quiet -dumpbase t.cc -noreg -version -o /tmp/cca04568.s GNU C++ version 1.35.0 (vax) compiled by GNU C version 1.34. as /tmp/cca04568.s -o t.o /usr/local/lib/gcc-ld++ -C /usr/local/lib/crt0+.o t.o -lg++ /usr/local/lib/gcc-gnulib -lc class parent { public: int foo() { printf("parent\n"); } }; class child : public parent { public: int foo() { printf("child\n"); } }; main() { child bar; int i = bar.parent::foo(); } Jon Becher argosy!becher@decwrl.dec.com "Why is live, evil spelled backwards?"