If we use 'typedef int bool' then this expression will evaluate differently. int main() { bool foo = (4 & 4); if (foo == true) { exit(1); } else { exit(2); } } Bug filed so we can backport as this will likely catch someone out doing a backport otherwise. _Bool which libreplace accepts, is in C99 per wikipedia, as is bool.
Did you actually saw problems related to this somewhere?
No, but was writing code that came close and thought this could bite someone - probably me - later, so wanted to close it off. https://gitlab.com/samba-team/samba/-/merge_requests/2437/diffs?commit_id=849f0321c00d1dd4b56d8bc207479e4750f7b828#5da6c41bbf6939d3d3a303b652b67bbf42b15e4f_623_653 came close, but is safe, but I felt like fixing it for an == true case.
This bug was referenced in samba master: c0f5af21acb8018a5e53d25f1560d2a96b79a7c0
Fixed for 4.17
*** Bug 12474 has been marked as a duplicate of this bug. ***