[PATCH] D134831: [Clang][Sema] Add -Wcast-function-type-strict
Bob Haarman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Feb 18 17:57:14 PST 2023
inglorion added a comment.
Is this intended to warn on code that casts a function taking a pointer to some non-void type to a function that takes a void*?
void set(void (*g)(int*)) {
f = (void(*)(void*)) g;
}
gives me
warning: cast from 'void (*)(int *)' to 'void (*)(void *)' converts to incompatible function type [-Wcast-function-type-strict]
I didn't see this mentioned in the diff description, comments, or test. Is the behavior intentional? Are these types actually incompatible?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134831/new/
https://reviews.llvm.org/D134831
More information about the cfe-commits
mailing list