[clang] Split -Wcast-function-type into a separate group (PR #86131)

Peter Dimov via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 14 04:15:16 PDT 2025


pdimov wrote:

This warning creates issues under Windows, where reinterpret-casting from FARPROC to the actual function type is common.

https://github.com/llvm/llvm-project/pull/92738
https://github.com/boostorg/interprocess/issues/259

Reinterpret-casting a function pointer to another function pointer type, then back to the original, is well defined in C++. In contrast, using `void*` for the same purpose is not.

https://github.com/llvm/llvm-project/pull/86131


More information about the cfe-commits mailing list