mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
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`).
771 lines
20 KiB
771 lines
20 KiB