code wiki / (root) / nx_checked_arith_const.nx

nx_checked_arith_const.nx

buildroot/runtime/nx_checked_arith_const.nx

803 B17 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_checked_arith_const.nx -- STANDING WITNESS for the COMPILE-TIME leg of LN1 checked arithmetic (sibling of nx_checked_arith.nx; same family as nx_boundscheck_constidx.nx). 9223372036854775807 + 1 is a provable i64 overflow written in source. Under the DEFAULT build this compiles clean and returns the WRAPPED value (MIN) -- the silent C-class behaviour, kept as the hazard record. Under `--chkarith` the compiler REFUSES it at parse time with the checked-arith-const-overflow diagnostic -- nx_chkarith_gate asserts both directions and that the refusal names this rule, not some other error. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_checked_arith_const.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

13func main() -> i64