lkml.org 
[lkml]   [2006]   [Jul]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 20 Jul 2006 09:52:58 +1000
FromPeter Williams <>
SubjectRe: [RFC][PATCH] A generic boolean
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-07-19 23:55    [from the cache]
©2003-2008