Debian Codegraph @

gcc/testsuite/rust/compile/unsafe7.rs

raw
1 extern "C" {
2 fn printf(fmt: *const i8, ...);
3 }
4
5 fn main() {
6 let s = "hey\0";
7
8 printf(s as *const str as *const i8); // { dg-error "call to extern function" }
9 }