diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-05-16 14:30:28 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-05-16 14:30:28 -0700 |
| commit | f33b3fc3eae54b9d1159fc5a7a69a4b0e4aceca6 (patch) | |
| tree | 30541782615edb604ecdbc1c5205b7e9caf54131 /src/codegen | |
| parent | a0de0adb8e22222716d4d42b26490461ecd67de3 (diff) | |
| download | zig-f33b3fc3eae54b9d1159fc5a7a69a4b0e4aceca6.tar.gz zig-f33b3fc3eae54b9d1159fc5a7a69a4b0e4aceca6.zip | |
zig.h: add casts for overflow arithmetic operations
This avoids the following error:
```
error: incompatible pointer types passing 'int64_t *' (aka 'long long *') to parameter of type 'long *'
overflow = __builtin_saddl_overflow(lhs, rhs, res);
^~~
```
My previous understanding was that this error would not occur because
prior to this line we check that int64_t is equivalent to long, like
this:
```c
```
However, it appears that this is still a warning in C if int64_t is
primarily aliased to `long long`, even though `long` and `long long` are
the same thing.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
