Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/kern
On Fri, Apr 17, 2009 at 12:10:57AM +0000, YAMAMOTO Takashi wrote:
> > Module Name: src
> > Committed By: ad
> > Date: Thu Apr 16 21:19:24 UTC 2009
> >
> > Modified Files:
> > src/sys/kern: kern_synch.c
> >
> > Log Message:
> > kpreempt: fix another bug, uintptr_t -> bool truncation.
>
> truncation?
> iirc, (_Bool)foo means foo != 0.
It appears you are right:
$ cat test2.c
#include <stdbool.h>
long value;
bool
truncate()
{
return value;
}
$ cc -S test2.c
$ cat test2.s
.file "test2.c"
.text
.globl truncate
.type truncate, @function
truncate:
pushl %ebp
movl %esp, %ebp
movl value, %eax
testl %eax, %eax
setne %al
popl %ebp
ret
.size truncate, .-truncate
.comm value,4,4
.ident "GCC: (Ubuntu 4.3.2-1ubuntu12) 4.3.2"
.section .note.GNU-stack,"",@progbits
Home |
Main Index |
Thread Index |
Old Index