diff options
| author | Evan Haas <evan@lagerdata.com> | 2021-02-22 13:09:51 -0800 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2021-02-25 22:24:11 +0200 |
| commit | 4f11a88b9f21a365cf2281e840ed12b0d4e687a6 (patch) | |
| tree | 2cdfb246283630b20a5ab1753175d4e724f42c3c /lib/std/debug.zig | |
| parent | 53cc63f0c91ce9f6f9c81f87e2673c5adfe1afe7 (diff) | |
| download | zig-4f11a88b9f21a365cf2281e840ed12b0d4e687a6.tar.gz zig-4f11a88b9f21a365cf2281e840ed12b0d4e687a6.zip | |
translate-c: Add support for pointer subtraction
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
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions
