gcc/testsuite/rust/compile/variadic.rs
raw| 1 | extern "C" { |
| 2 | fn printf(s: *const i8, ...); |
| 3 | } |
| 4 | |
| 5 | fn main() { |
| 6 | // { dg-error "expected .c_int. variadic argument" "" { target *-*-* } .+1 } |
| 7 | printf("%d\n" as *const str as *const i8, 1i8); |
| 8 | |
| 9 | // { dg-error "expected .c_uint. variadic argument" "" { target *-*-* } .+1 } |
| 10 | printf("%d\n" as *const str as *const i8, 1u8); |
| 11 | |
| 12 | // { dg-error "expected .c_double. variadic argument" "" { target *-*-* } .+1 } |
| 13 | printf("%d\n" as *const str as *const i8, 1f32); |
| 14 | } |