mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
translate-c: support GCC/Clang pointer subtraction extension
Pointer subtraction on `void *` or function pointers is UB by the C spec, but is permitted by GCC and Clang as an extension. So, avoid crashing translate-c in such cases, and follow the extension behavior -- there's nothing else that could really be intended.
This commit is contained in:
parent
d3c6f7179c
commit
93cb44c805
2 changed files with 33 additions and 11 deletions
Loading…
Add table
Add a link
Reference in a new issue