Article View: gnu.g++.bug
Article #1410Member function overloading
From: Paul N. Hilfinger
Date: Tue, 26 Jan 1993 01:29
Date: Tue, 26 Jan 1993 01:29
23 lines
994 bytes
994 bytes
In at least versions 1.39, 2.2.2, and 2.3.3 of g++/gcc (for the Sun),
the attached program compiles without comment. My understanding is
that, on the contrary, the definition of I::f should hide, rather than
overload, that of H::f, making the calls f() and x.f() illegal.
P. Hilfinger
---------------------------- cut here ---------------------------
class H {
public:
int f();
};
class I : public H {
public:
int f(double) { return f(); }
};
int main()
{
I x;
return x.f();
}
Technical Details
Message-ID:
<9301240927.AA02697@tully.CS.Berkeley.EDU.iliad>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tully.cs.berkeley.edu!hilfingrShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!tully.cs.berkeley.edu!hilfingr From: hilfingr@tully.cs.berkeley.edu (Paul N. Hilfinger) Newsgroups: gnu.g++.bug Subject: Member function overloading Date: 25 Jan 1993 20:29:30 -0500 Organization: GNUs Not Usenet Lines: 24 Sender: daemon@cis.ohio-state.edu Approved: bug-g++@prep.ai.mit.edu Distribution: gnu Message-ID: <9301240927.AA02697@tully.CS.Berkeley.EDU.iliad>