diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-09-19 02:20:05 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-09-20 17:49:00 -0700 |
| commit | 0e47bd16dac9dcdfc12168c07104030af8eaaa8b (patch) | |
| tree | f0187c40b264ad1a85d9f050a43074c3e38ef23b /lib/std/json | |
| parent | 4d1b15bd9d4175127a63595f4fd80761c2e6564c (diff) | |
| download | zig-0e47bd16dac9dcdfc12168c07104030af8eaaa8b.tar.gz zig-0e47bd16dac9dcdfc12168c07104030af8eaaa8b.zip | |
add behavior test: return undefined pointer from function
This clarifies that it is legal to return an invalid pointer from a
function, provided that such pointer is not dereferenced.
This matches current status quo of the language. Any change to this
should be a proposal that argues for different semantics.
It is also legal in C to return a pointer to a local. The C backend
lowers such thing directly, so the corresponding warning in C must be
disabled (`-Wno-return-stack-address`).
Diffstat (limited to 'lib/std/json')
0 files changed, 0 insertions, 0 deletions
