This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8826: "a >> b" differs from "a.operator>>(b)" in that virtual function calls are not avoided
- From: "Giovanni Bajo" <giovannibajo at libero dot it>
- To: <gcc-gnats at gcc dot gnu dot org>,<gcc-bugs at gcc dot gnu dot org>,<nobody at gcc dot gnu dot org>,<gcc-prs at gcc dot gnu dot org>,<niemayer at isg dot de>
- Date: Fri, 2 May 2003 13:56:18 +0200
- Subject: Re: c++/8826: "a >> b" differs from "a.operator>>(b)" in that virtual function calls are not avoided
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8826
Reconfirmed with everything up to current mainline (20030430). I agree this
is a serious performance pessimization and it should be handled as soon as
possible.
I don't think there are any correctness problem though, since the compiler
knows that a is exactly of type A (it's not a reference or a pointer), so
it's always ok to inline the method, even without specifying
a.A::operator>>() explitally.
Giovanni Bajo