On Friday, January 9, 2015, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx> wrote: > Am 08/01/2015 um 18:43 schrieb Jérôme Duval: > >> 2015-01-08 8:22 GMT+01:00 Adrien Destugues <pulkomandy@xxxxxxxxx>: >> >>> The implicit cast from int32 to bool yields the correct result >>> (B_CONTROL_OFF == 0 casts to false, B_CONTROL_ON == 1 casts to true) and >>> this doesn't trigger any compiler warning. >>> >> >> This is nonetheless forbidden in the coding guidelines: "Always use >> boolean conditions, instead of pointer/integer logic". That this >> doesn't trigger any compiler warning is off my point. >> > > +1 > If it is allowed by the C++ language spec I'll allow it, otherwise if it falls under the category of undefined behavior, I won't allow it.