Article View: gnu.gcc.bug
Article #1213gcc-2.2.2 bug
From: Joe Fasano
Date: Thu, 15 Oct 1992 15:11
Date: Thu, 15 Oct 1992 15:11
38 lines
1307 bytes
1307 bytes
Running gcc-2.2.2 on a SparcStation running SunOS 4.1.2
This example is from the ARM.
#include <iostream.h>
class B {
public:
void f(int);
};
void B::f (int i) { cout << "called B \n";}
class D : public B {
public:
void f(char*);
};
void D::f (char* c) { cout << "called D\n";}
main()
{
D pd;
pd.f(1); // error: D::f(char*) hides B::f(int)
// g++ results in a call to B.
// section 13.1, page 310 of ARM(Ellis & Stroustrup)
// clearly states that it should generate an error.
}
- joe
joe@veritas.com
-----------------------------------------------------------------------------
Joe Fasano Internet: joe@veritas.com
Veritas Software uucp: ...!{apple,pyramid}!veritas!joe
4800 Great America Pkwy, Ste 420
Santa Clara, CA 95054 Phone: 408-727-1222
Technical Details
Message-ID:
<m0mfWqz-0000L1C@aches.veritas.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!veritas.COM!joeShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!veritas.COM!joe From: joe@veritas.COM (Joe Fasano) Subject: gcc-2.2.2 bug Message-ID: <m0mfWqz-0000L1C@aches.veritas.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 15 Oct 1992 15:11:00 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 39