[PATCH] D13704: [Fix] Allow implicit conversions of the address of overloadable functions in C + docs update
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 18 11:21:58 PDT 2016
rsmith added inline comments.
================
Comment at: lib/Sema/SemaOverload.cpp:10419
@@ -10418,3 +10429,1 @@
- ResultTy) ||
- (!S.getLangOpts().CPlusPlus && TargetType->isVoidPointerType())) {
Matches.push_back(std::make_pair(
----------------
Why is the `void*` check removed from this case? Note that clang and GCC intentionally treat these two cases differently today:
int f();
void *p = f; // ok (warning under -pedantic)
int *q = f; // warning: incompatible pointer types
(That is: the first is a silent-by-default extension and the second is a warn-by-default extension.)
http://reviews.llvm.org/D13704
More information about the cfe-commits
mailing list