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?