Messages in this thread | | | Date | Fri, 2 May 2014 10:43:20 +0200 | Subject | Re: dcache shrink list corruption? | From | Szeredi Miklos <> |
| |
On Thu, May 1, 2014 at 4:34 PM, Al Viro <viro@zeniv.linux.org.uk> wrote: > On Thu, May 01, 2014 at 11:42:52AM +0200, Miklos Szeredi wrote:
>> - "bool foo = flag & FLAG" looks suspicious. Is this guaranteed not to >> overflow? > > What do you mean, overflow? It's not a 1-bit unsigned int; conversion to > _Bool is different (which is the only reason why it's more than mere > syntax sugar). See C99 6.3.2.1 ("When any scalar value is converted > to _Bool, the result is 0 if the value compares equal to 0; otherwise, > the result is 1").
Ah, didn't know that.
Thanks, Miklos
| |