diff options
-rw-r--r-- | cortex-m-rt/examples/device.rs | 1 | ||||
-rw-r--r-- | cortex-m-rt/examples/warnings.rs | 1 | ||||
-rw-r--r-- | cortex-m-rt/src/lib.rs | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/cortex-m-rt/examples/device.rs b/cortex-m-rt/examples/device.rs index c18b569..02a60c8 100644 --- a/cortex-m-rt/examples/device.rs +++ b/cortex-m-rt/examples/device.rs @@ -16,6 +16,7 @@ fn main() -> ! { } // interrupts portion of the vector table +#[repr(C)] pub union Vector { handler: unsafe extern "C" fn(), reserved: usize, diff --git a/cortex-m-rt/examples/warnings.rs b/cortex-m-rt/examples/warnings.rs index 3372003..abf4a2f 100644 --- a/cortex-m-rt/examples/warnings.rs +++ b/cortex-m-rt/examples/warnings.rs @@ -22,6 +22,7 @@ extern "C" { fn INT(); } +#[repr(C)] union Vector { #[allow(dead_code)] handler: unsafe extern "C" fn(), diff --git a/cortex-m-rt/src/lib.rs b/cortex-m-rt/src/lib.rs index 920c989..27bb1bd 100644 --- a/cortex-m-rt/src/lib.rs +++ b/cortex-m-rt/src/lib.rs @@ -1128,6 +1128,7 @@ extern "C" { } #[doc(hidden)] +#[repr(C)] pub union Vector { handler: unsafe extern "C" fn(), reserved: usize, |