You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
does the panic handler really need to be extern "C"?
it causes a warning due to PanicInfo not being ffi-safe:
Compiling bootloader v0.8.2 (/Users/user/.cargo/registry/src/github.com-1ecc6299db9ec823/bootloader-0.8.2)
warning: `extern` fn uses type `core::panic::PanicInfo`, which is not FFI-safe
--> src/main.rs:368:31
|
368 | pub extern "C" fn panic(info: &PanicInfo) -> ! {
| ^^^^^^^^^^ not FFI-safe
|
= note: `#[warn(improper_ctypes)]` on by default
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
= note: this struct has unspecified layout
Finished release [optimized + debuginfo] target(s) in 3.16s
The text was updated successfully, but these errors were encountered:
Thanks for reporting! I think the extern "C" calling convention is a relict from the time when no panic_handler attribute existed and one had to define a so-called language item manually. It should be safe to remove the extern "C". Would you mind creating a pull request?
https://github.com/rust-osdev/bootloader/blob/master/src/main.rs#L368
does the panic handler really need to be extern "C"?
it causes a warning due to PanicInfo not being ffi-safe:
The text was updated successfully, but these errors were encountered: