blob: 2049d1d2dd3e4f57b1d42c6207373b6ca9c9b2b8 [file]
// { dg-output "18\r*\n" }
#![feature(no_core)]
#![no_core]
extern "C" {
fn printf(s: *const i8, ...);
}
fn print_int(value: i32) {
let s = "%d\n\0" as *const str as *const i8;
unsafe {
printf(s, value);
}
}
macro_rules! add_exprs {
($($e:expr)*) => (0 $(+ $e)*)
}
fn main() -> i32 {
// 1 + 2 + 15 => 18
print_int(add_exprs!(1 2 15));
0
}