This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: EGCS
- To: nasher at ichips dot intel dot com
- Subject: Re: EGCS
- From: "Martin v. Loewis" <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Wed, 9 Jun 1999 09:16:14 +0200
- CC: egcs-bugs at egcs dot cygnus dot com
- References: <199906081836.OAA28090@pdxhp999.pdx.intel.com>
> I had submitted a request similar to the one given below on your newsgroup
> sometime ago. I was wondering if it was possible for someone to let me know
> if a fix for this might be coming sometime. Please do let me know.
Thanks for your report. Please have a look at
http://egcs.cygnus.com/bugs.html
(heading Using declarations in classes do not work). This is an old
bug, and it is unlikely to get fixed anytime soon.
> // If you uncomment the following 2 lines you get the workaround for
> // the problem.
> // virtual void Print(X x) { A::Print(x); }
> // virtual void Print(Y y) { A::Print(y); }
> virtual void Print(Z z) { cout << "The value of Z = " << z << endl; }
Meanwhile, the work-around you mention is the best thing you can do.
Please note that you don't have to make the functions virtual. If you
don't, the compiler will inline the calls to the base methods, so you
don't pay any runtime overhead for this work-around - only additional
source code.
Hope this helps,
Martin