c++/8826: "a >> b" differs from "a.operator>>(b)" in that virtual function calls are not avoided

Giovanni Bajo giovannibajo@libero.it
Fri May 2 11:56:00 GMT 2003


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



More information about the Gcc-bugs mailing list