Skip to content

Translate C boolean expressions#12

Merged
nunoplopes merged 10 commits intoCpp2Rust:masterfrom
lucic71:c-boolean-exprs
Apr 20, 2026
Merged

Translate C boolean expressions#12
nunoplopes merged 10 commits intoCpp2Rust:masterfrom
lucic71:c-boolean-exprs

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented Apr 19, 2026

In C, as opposed to C++, clang does not generate IntegerToBoolean implicit casts. To fix this, create an artificial implicit cast so that C and C++ code can be handled uniformly.

As a side effect of this PR, C unit tests are now translated in C instead of C++. va_arg_struct_ctx.c does not translate well in C yet, this will be handled in #10

@nunoplopes nunoplopes merged commit d0495a5 into Cpp2Rust:master Apr 20, 2026
10 of 17 checks passed
@lucic71
Copy link
Copy Markdown
Contributor Author

lucic71 commented Apr 20, 2026

This fails on macOS, I will do another PR to fix it

@lucic71 lucic71 deleted the c-boolean-exprs branch April 29, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants