0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

Improve handling of C compiler intrinsics in translate-c

C compiler intrinsics can only appear as part of a function call. When called
they are implicitly cast to a function pointer; treat this as a non-null
pointer so that it emits as a regular Zig function call.

Put `pub usingnamespace @import("std").c.builtins;` at the top of translated
C files so that they will have access to builtin functions defined there.

Fixes #6707
This commit is contained in:
Evan Haas 2020-12-13 08:01:13 -08:00 • committed by Veikka Tuominen
commit ccdb81fb31
4 changed files with 322 additions and 4 deletions