2016-08-26 11:23:42 -05:00
|
|
|
#![allow(unused)]
|
|
|
|
#![deny(improper_ctypes)]
|
2016-08-24 13:10:19 -05:00
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
#[repr(C)]
|
2016-08-24 13:10:19 -05:00
|
|
|
union U {
|
|
|
|
a: u8,
|
|
|
|
}
|
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
union W {
|
|
|
|
a: u8,
|
2016-08-24 13:10:19 -05:00
|
|
|
}
|
|
|
|
|
2016-08-26 11:23:42 -05:00
|
|
|
extern "C" {
|
|
|
|
static FOREIGN1: U; // OK
|
2018-02-11 18:08:48 -06:00
|
|
|
static FOREIGN2: W; //~ ERROR union has unspecified layout
|
2016-08-24 13:10:19 -05:00
|
|
|
}
|
2016-08-26 11:23:42 -05:00
|
|
|
|
|
|
|
fn main() {}
|