blob: a4e0034c40bdc47388d3df61bc816b8b514f9810 (
plain)
1
2
3
4
5
6
7
8
9
10
|
//@ignore-target-windows: No libc on Windows
use std::ptr;
// null is explicitly called out as UB in the C docs.
fn main() {
unsafe {
libc::memcmp(ptr::null(), ptr::null(), 0); //~ERROR: dangling
}
}
|