# Sema: improved C pointers and casting · gitcafe/zig

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

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

Visibility: public

Requested revision: c6b3d06535f4227541c13fe75da347a485abdb4f

Requested commit: c6b3d06535f4227541c13fe75da347a485abdb4f

Commit: c6b3d06535f4227541c13fe75da347a485abdb4f

Tree: 8f0a730e1dc7619168a81d2cd4521db1e7a1b4b6

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Sema: improved C pointers and casting

 * C pointer types always have allowzero set to true but they omit the
   word allowzero when printed.
 * Implement coercion from C pointers to other pointers.
 * Implement in-memory coercion for slices and pointer-like optionals.
 * Make slicing a C pointer drop the allowzero bit.
 * Value representation for pointer-like optionals is now allowed to use
   pointer tag values in addition to the `opt_payload` tag.

```

## Parents

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

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