# translate-c: improve support of integer casting · gitcafe/zig

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

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

Visibility: public

Requested revision: dc28526c6cd9320fefeebe15a90dd9269cf2b2ca

Requested commit: dc28526c6cd9320fefeebe15a90dd9269cf2b2ca

Commit: dc28526c6cd9320fefeebe15a90dd9269cf2b2ca

Tree: b44dded33d9e911e4de4024a9c9ea75378416c66

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
translate-c: improve support of integer casting

Widening and truncating integer casting to different signedness
works better now. For example `(unsigned long)-1` is now translated
to zig code that compiles correctly.

```

## Parents

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

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