On Sat, Jan 23, 2010 at 4:16 PM, Olivier Galibert <galib...@pobox.com> wrote: > On Sat, Jan 23, 2010 at 09:21:47AM -0500, Joern Rennecke wrote: >> [This started on gcc-patches] >> Quoting Richard Guenther <richard.guent...@gmail.com>: > [...] >> > bool all_critical_edge_p = true; >> > all_critical_edge_p &= e->flags & EDGE_CRITICAL; > [...] >> I think a better long-term plan would be to add an option to insert run-time >> checks to abort when a integer other than 0 or 1 is converted to bool / >> _Bool. > > Which does not happen in the cited example. What could be interesting > (if it doesn't exist already) is a warning when using bitwise ops on > bools. Even when it is correct, it tends to be too clever/fragile.
We could warn about this when building with C++ but with C we do not see bools but ints here. Nevetheless a good idea. Richard. > OG. >