c2rust icon indicating copy to clipboard operation
c2rust copied to clipboard

Map one and zero to true and false in bool expressions

Open thedataking opened this issue 5 years ago • 2 comments

thedataking avatar Sep 03 '20 11:09 thedataking

I rebased this. It seems like a fairly straightforward bit of low-hanging fruit; we now transpile _Bool cond = 1; as let mut cond: bool = true; (as opposed to let mut cond: bool = 1 as std::ffi::c_int != 0;).

fw-immunant avatar Aug 21 '25 18:08 fw-immunant

@kkysen can this land now or is it obsoleted by your work?

thedataking avatar Nov 15 '25 03:11 thedataking