mirror of
https://github.com/ziglang/zig.git
synced 2025-12-26 08:03:08 +00:00
When two pointers are subtracted, both shall point to elements of the same array object, or one past the last element of the array object; the result is the difference of the subscripts of the two array elements. The size of the result is implementation-defined, and its type (a signed integer type) is ptrdiff_t defined in the <stddef.h> header. If the result is not representable in an object of that type, the behavior is undefined. See C Standard, ยง6.5.6 [ISO/IEC 9899:2011] Fixes #7216