On Sat, Oct 26, 2013 at 6:28 AM, Lukas Mai <plokinom@gmail.com> wrote: > On 26.10.2013 12:16, Peter Martini wrote: >> >> Does anyone know what the C99 standard says about _Bool? I'm having >> trouble finding it in Google, and don't have a copy of the standard. > > http://www.open-std.org/jtc1/sc22/wg14/www/standards.html > > "The latest publicly available version of the C99 standard is the > combined C99 + TC1 + TC2 + TC3, WG14 N1256, dated 2007-09-07. This is a > WG14 working paper, but it reflects the consolidated standard at the > time of issue." > http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf > > Thanks! So, the standard essentially says _Bool is a byte (technically, that it's rank is less than char), and that anywhere any scalar is converted to a bool, a non-zero value is converted to true (1) instead of truncated, like char would be. Which also implies that cBOOL is unnecessary when assigning to bools if stdbool.h is in use. I'm not suggesting changing anything though, just thinking out loud :-)Thread Previous | Thread Next