Path: utzoo!attcan!uunet!decwrl!ucbvax!ulysses!fox From: fox@allegra.att.com (David Fox) Newsgroups: comp.std.c++ Subject: Inheritance in cfront and g++ Message-ID: Date: 15 Aug 90 14:10:45 GMT Sender: netnews@ulysses.att.com Distribution: comp Organization: AT&T Bell Laboratories Lines: 25 In porting code from g++ to cfront I have come across the following inconsistancy. The following program compiles as-is in g++ class A { public: void f(int); }; class B : public A { public: void f(char*); //void f(int i) {A::f(i);} }; main() { B x; x.f(3); } And the call to x.f(3) finds the function f in class A. In cfront, however, the function f in class B "masks" the f in class A, so you need the commented f(int) member function to get this to compile. To me, the g++ semantics make more sense. Do others agree?