# Improve handling of C compiler intrinsics in translate-c · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ccdb81fb31f3fa1384b44b74ecdae345457bd0b5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ccdb81fb31f3fa1384b44b74ecdae345457bd0b5

Requested commit: ccdb81fb31f3fa1384b44b74ecdae345457bd0b5

Commit: ccdb81fb31f3fa1384b44b74ecdae345457bd0b5

Tree: e58de03181610a033949c2079b607336072af5a8

Author: Evan Haas

Committer: Veikka Tuominen

## Message

```
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

```

## Parents

- [6a75cfd0f6d45de3b4d1ad74eaec892dc1cd6e30](https://git.cafe/gitcafe/zig/commit/6a75cfd0f6d45de3b4d1ad74eaec892dc1cd6e30?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ccdb81fb31f3fa1384b44b74ecdae345457bd0b5?format=markdown)
