[clang] [clang][WebAssembly] Handle casted function pointers with different number of arguments (PR #153168)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 3 09:47:56 PDT 2025


juj wrote:

Re-reading back the original description of the PR, I see there's

> This solves many open issues, like:
> 
>     * https://github.com/llvm/llvm-project/issues/64526

though this PR doesn't quite solve this, since it (silently?) will try to fix up the call sites with mismatching pointers. In issue 64526, I am looking after a way to get a warning or an error at compile time for call sites that perform casts that are unsafe specifically for Wasm.

In other words, in production I am not sure if I would like to use `-fwasm-fix-function-bitcasts` to "hide the problem under the rug", but I would like to have a more focused warning to guide analysing casts that are problematic for WebAssembly, with the intent of fixing the code of such call sites by hand.

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


More information about the cfe-commits mailing list