We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
too many arguments to fn_ptr: log (got 2 args, expected 1)
//! Issue #56309 extern "C" { fn log(message_data: u32, message_size: u32); } pub fn main() { let message = "Hello, world!"; unsafe { log(message.as_ptr() as u32, message.len() as u32); } }
libgccjit.so: error: gcc_jit_context_new_call_through_ptr: too many arguments to fn_ptr: log (got 2 args, expected 1) gcc_jit_rvalue_get_type: NULL rvalue libgccjit.so: error: gcc_jit_function_new_local: NULL type libgccjit.so: error: gcc_jit_block_add_assignment: NULL lvalue gcc_jit_lvalue_as_rvalue: NULL lvalue
The text was updated successfully, but these errors were encountered:
log is a function in libm. Gcc likely has it pre-declared with the same signature as the libm version to be able to replace it with a faster version at compile time. LLVM has the exact samw problem as I understand it. And in the past it also used to have to be an issue when #[link(wasm_import_module)] was used to import from a non-default module: rust-lang/rust#56309 The test is not meant to work outside of webassembly with #[link(wasm_import_module)]. https://github.com/rust-lang/rust/blob/e5bb341f0e1db4e4407f129d9834f9ada2030b7c/tests/run-make/wasm-symbols-different-module/log.rs
log
#[link(wasm_import_module)]
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: