# translate-c: update for new function pointer semantics · gitcafe/zig

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

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

Visibility: public

Requested revision: f0ddc7f7a2e2fba2515dfb4f3ad06ea56646eba7

Requested commit: f0ddc7f7a2e2fba2515dfb4f3ad06ea56646eba7

Commit: f0ddc7f7a2e2fba2515dfb4f3ad06ea56646eba7

Tree: 45f70c9e463de4113c1ac64ba689582736a260b9

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
translate-c: update for new function pointer semantics

After #10656, function pointers are represented with e.g.
`*const fn()void` rather than `fn()void`.

This commit adds code to translate-c to emit different code
depending on whether the output zig source code is intended
to be compiled with stage1 or stage2.

Ideally we will have stage1 and stage2 support the exact same
Zig language, but for now they diverge because I would rather
focus on finishing and shipping stage2 than implementing the
features in stage1.

```

## Parents

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

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