diff options
| author | Evan Haas <evan@lagerdata.com> | 2021-02-08 11:43:57 -0800 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2021-02-10 20:23:27 +0200 |
| commit | a2ec77041bc4a58d922cd3f8db923b7272b1f8f7 (patch) | |
| tree | 2543c29e0d80afe56639e5bcaad1942eb2f939f8 /src/codegen.zig | |
| parent | 1480c428065c01c6feff22ce84021c2e0e30aa9b (diff) | |
| download | zig-a2ec77041bc4a58d922cd3f8db923b7272b1f8f7.tar.gz zig-a2ec77041bc4a58d922cd3f8db923b7272b1f8f7.zip | |
translate-c: call @boolToInt on return value when necessary
In C, if a function has return type `int` and the return expression
is a boolean expression, there is no implicit cast. Therefore the
translated Zig code needs to call @boolToInt() on the result.
Written with feedback from @Vexu
Fixes #6215
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
