This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/58316] New: error: call of overloaded âfoo(long long unsigned int, long long unsigned int)â is ambiguous
- From: "pluto at agmk dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 Sep 2013 17:19:15 +0000
- Subject: [Bug c++/58316] New: error: call of overloaded âfoo(long long unsigned int, long long unsigned int)â is ambiguous
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58316
Bug ID: 58316
Summary: error: call of overloaded âfoo(long long unsigned int,
long long unsigned int)â is ambiguous
Product: gcc
Version: 4.8.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pluto at agmk dot net
$ cat t.cpp
#if !defined( __GNUC__) && !defined( __x86_64__)
#error "testcase requires LLP64 arch"
#endif
typedef unsigned long u64_t1;
void foo( u64_t1, u64_t1 );
void foo( unsigned, unsigned );
void bar()
{
foo( 0xffffffffffffffffull, 0xffffffffffffffffull );
}
$ g++ -Wall t.cpp -c -m64
t.cpp: In function âvoid bar()â:
t.cpp:12:52: error: call of overloaded âfoo(long long unsigned int, long long
unsigned int)â is ambiguous
foo( 0xffffffffffffffffull, 0xffffffffffffffffull );
^
t.cpp:12:52: note: candidates are:
t.cpp:7:6: note: void foo(u64_t1, u64_t1)
void foo( u64_t1, u64_t1 );
^
t.cpp:8:6: note: void foo(unsigned int, unsigned int)
void foo( unsigned, unsigned );
^
the 'unsigned long' and 'unsigned long long' have the same size
on the x86-64(llp64) target, so where's the ambiguity?