This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13907] New: pedantic needed to disambiguate
- From: "japple at freeshell dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jan 2004 00:13:14 -0000
- Subject: [Bug c++/13907] New: pedantic needed to disambiguate
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
struct A {
operator int & ();
operator const int & () const;
};
void f(int &);
void f(const int &);
int main() {
const A x = A();
f(x);
}
gives
const_overload.cpp: In function `int main()':
const_overload.cpp:12: error: call of overloaded `f(const A&)' is ambiguous
const_overload.cpp:7: error: candidates are: void f(int&)
const_overload.cpp:8: error: void f(const int&)
unless -pedantic is set.
--
Summary: pedantic needed to disambiguate
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: japple at freeshell dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86 linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13907