This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11342] New: Method selection warning prevents compilation
- From: "dan at photon dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Jun 2003 01:06:05 -0000
- Subject: [Bug c++/11342] New: Method selection warning prevents compilation
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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.