This is the mail archive of the
gcc-prs@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: nobody at gcc dot gnu dot org
- Cc: gcc-prs at gcc dot gnu dot org,
- Date: 2 May 2003 12:06:01 -0000
- Subject: Re: c++/8826: "a >> b" differs from "a.operator>>(b)" in that virtual function calls are not avoided
- Reply-to: "Giovanni Bajo" <giovannibajo at libero dot it>
The following reply was made to PR c++/8826; it has been noted by GNATS.
From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
<gcc-bugs@gcc.gnu.org>,
<nobody@gcc.gnu.org>,
<gcc-prs@gcc.gnu.org>,
<niemayer@isg.de>
Cc:
Subject: Re: c++/8826: "a >> b" differs from "a.operator>>(b)" in that virtual function calls are not avoided
Date: Fri, 2 May 2003 13:56:18 +0200
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