From the C++ standard, 7.5p1: Two function types with different language linkages are distinct types even if they are otherwise identical. The following code tests for this and should compile (a successful compile indicates a test pass). template <bool> struct static_assert; template<> struct static_assert<true> {}; extern "C" { char myexit(void (*)(void)); typedef void (*CF)(void); } int myexit(void (*f)()) { static_assert<sizeof(myexit((CF)f)) == 1> e1; return myexit((CF)f); } int main() { } extern "C" { char myexit(void (*)(void)) { return 0; } }
*** This bug has been marked as a duplicate of 2316 ***