Skip to content

Commit 08d30ea

Browse files
authored
Merge pull request #494 from rust-embedded/vector-repr-c
c-m-rt: mark Vector as repr(C)
2 parents 8050902 + d6c2485 commit 08d30ea

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

cortex-m-rt/examples/device.rs

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ fn main() -> ! {
1616
}
1717

1818
// interrupts portion of the vector table
19+
#[repr(C)]
1920
pub union Vector {
2021
handler: unsafe extern "C" fn(),
2122
reserved: usize,

cortex-m-rt/examples/warnings.rs

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ extern "C" {
2222
fn INT();
2323
}
2424

25+
#[repr(C)]
2526
union Vector {
2627
#[allow(dead_code)]
2728
handler: unsafe extern "C" fn(),

cortex-m-rt/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,7 @@ extern "C" {
11281128
}
11291129

11301130
#[doc(hidden)]
1131+
#[repr(C)]
11311132
pub union Vector {
11321133
handler: unsafe extern "C" fn(),
11331134
reserved: usize,

0 commit comments

Comments
 (0)