Meg's Mirrors
zig
about
heads
tags
log
tree
search
Search
zig
test
cases
compile_errors
integer_underflow_error.zig
pretty
plain
permalink
blame
history
•
7 lines
•
196 B
1
export fn entry() void {
2
_ = @as(*anyopaque, @ptrFromInt(~@as(usize, @import("std").math.maxInt(usize)) - 1));
3
}
4
5
// error
6
//
7
// :2:84: error: overflow of integer type 'usize' with value '-1'