aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/rust/compile/variadic.rs
blob: e970cd16a19bb3c136b09886f68e45502764dd34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extern "C" {
    fn printf(s: *const i8, ...);
}

fn main() {
    // { dg-error "expected .c_int. variadic argument" "" { target *-*-* } .+1 }
    printf("%d\n" as *const str as *const i8, 1i8); 

    // { dg-error "expected .c_uint. variadic argument" "" { target *-*-* } .+1 }
    printf("%d\n" as *const str as *const i8, 1u8); 

     // { dg-error "expected .c_double. variadic argument" "" { target *-*-* } .+1 }
    printf("%d\n" as *const str as *const i8, 1f32);
}