[Bug c++/11342] New: Method selection warning prevents compilation
dan at photon dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 27 01:06:00 GMT 2003
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11342
Summary: Method selection warning prevents compilation
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dan at photon dot com
CC: gcc-bugs at gcc dot gnu dot org
In certain cases, I have source code that generates the following warning:
test.cpp In member function 'xxxx':
test.cpp:xx choosing 'char& String::operator[](unsigned int)' over 'operator[] '
test.cpp:xx because worst conversion for the former is better than worst
conversion for the latter
I've gotten a test case pruned down to the class with the offending methods
(char& String::operator[](unsigned int) and char String::operator[](unsigned
int) const). But if I strip out everything in the class except for the methods,
the warning goes away. I will keep at it to create a simple test case an attach
it later.
More information about the Gcc-bugs
mailing list