-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to pass i64 without WASM_BIGINT should warn or assert #15871
Comments
Good idea. We should probably also add a test to ensure it does work as expected when WASM_BIGINT is enabled. Looking into this I'm not sure how easy it will be to issue such a warning. BTW, we also don't warn for other unsupported types (e.g. struct types) so this issue is larger than just i64. |
We do have access to the string of the signature, e.g. "(int64_t i)", however we don't have way to know about type names used in the C/C++ code. I'm not sure we can enumberate all the valid types or figure out if a given type lowers to i64. For example, if a user has a typedef called We could decide that we only accept a fixed set of names for type in EM_JS macros (for example Alternatively we could look specifically for know-bad types such as I'm not sure either of these options really solves the problem fully though. |
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
Ideally we should error out if WASM_BIGINT is not passed by I have yet to find a good place to do that. See #15871
This code:
should issue at least a runtime warning if it was not compiled with WASM_BIGINT.
Comments and pointers appreciated for a (hopefully) upcoming PR.
Version of emscripten/emsdk:
The text was updated successfully, but these errors were encountered: