Noisy when choosing T::operator Type() vs T::op constType() const
Mark Mitchell
mark@codesourcery.com
Mon Sep 18 22:32:00 GMT 2000
>>>>> "Jason" == Jason Merrill <jason@redhat.com> writes:
Jason> The warning is intended to let people know about what I
Jason> consider a rather confusing rule:
It is a confusing rule. I just don't think warning about it
helps. :-)
Basically, there are tons of things about overloading that are
non-intuitive to people. The hit rate on this warning, in terms of
actually showing up bugs in code, is probably small, in my opinion.
Whereas a warning about, say, using a possibly uninitialized variable
is more likely to actually indicate a real bug.
To me, this particular warning is the kind of thing that goes in a C++
tutorial, not a compiler warning message. It occurs too often in
normal bug-free code.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-bugs
mailing list