deprecate boolean evaluation of floating point and character types
Richard (Rikki) Andrew Cattermole
richard at cattermole.co.nz
Tue Apr 30 18:09:22 UTC 2024
Characters are quite often compared against zero when doing string
handling in C without the binary expression. For this reason I would not
want to see this changed.
Now floats on the other hand... there is no clear truthiness value
associated with them, unless IEEE-754 defines one (it doesn't appear to
for 2008 version).
C23 appears to not define if a floating point type can even convert to
bool, although it does mention bool as not being supported in multiple
places.
More information about the dip.ideas
mailing list