https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62145
Bug ID: 62145 Summary: match rulers in overload functions Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: pangbw at gmail dot com For this small program, G++ and clang++ don't agree with each other: 1. cat x2.c #include <stdio.h> char f(...) { return '\1'; }; int f(void*) { return 999; } constexpr int t2(int n) { return sizeof f(n*0); } int main() { char b[ t2(0) ]; printf("sizeof b is %d\n", sizeof(b)); return 0; } 2. $ g++ -std=c++0x x2.cpp $ ./a.out sizeof b is 4 $ clang++ -std=c++11 x2.cpp $ ./a.out sizeof b is 1 It shows G++ is calling f(void*), but clang++ is calling f(...). which one is right?