-
-
Notifications
You must be signed in to change notification settings - Fork 3k
translate_c: fix ternary operator output in C macros #24664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This version of translate-c is going to be deleted in favor of ziglang/translate-c: #24497. You should contribute this there instead. |
Per this comment: #24546 (comment), maybe let's see if this can land in 0.15? |
Will this work if the |
This doesn't support other scalar types yet. It's also necessary to improve the ternary operator translation in normal (non-macro) code, which currently also uses the |
Any possibilities for this to be merged by the next minor version? |
@Vexu if this is indeed intended for 0.15.2, can you review it? |
The fix looks good and should be non-breaking but since my priority is ziglang/translate-c I don't care too much about it making it to 0.15.2. The issue should remain open/be transferred if this is merged since this is also broken in the new implementation. |
@cmpute can you please retarget the PR against the |
@alexrp Could you please provide some guidance on how to add translate-c test in the latest master? I can't find where are those translate-c test cases |
Thanks, I'll close this then. But feel free to submit a PR to https://github.com/ziglang/translate-c if the bug still exists on master though. |
this is a fix for ziglang/translate-c#44 . Basically it tries to wrap all the conditions in ternary operation with a zero check.