Re: [RFC][PATCH] A generic boolean

Peter Williams
2006-07-19T23:53:01Z

ricknu-0@student.ltu.se wrote:
> Citerar Alexey Dobriyan <adobriyan@gmail.com>:
>> Please, show compiler flag[s] to enable warning[s] from gcc about
>>
>> _Bool foo = 42;
>>
>> Until you do that the whole activity is moot.
> On it...

Would not the compiler treat 42 as a Boolean expression (as opposed to
an integer expression) that evaluates to true and set foo accordingly.
I.e. there's only a problem here if foo ends up with the value 42
instead of the value true.

Peter
--
Peter Williams pwil3058@bigpond.net.au

"Learning, n. The kind of ignorance distinguishing the studious."
-- Ambrose Bierce