On 01/25/2012 07:40 AM, Anthony Liguori wrote:
>>>
>>> (void *) isn't compatible with integers or function pointers (at least
>>> not in a portable way).
> 
> I don't see how they can be compatible since on some platforms
> sizeof(void (*)(void)) != sizeof(void *).

C99 says they are not required to be the same, but POSIX adds an
additional requirement on top of C that all function pointers must be
convertible to void* and back without loss of data.  Pretty much any
system where qemu can compile is probably already complying with that
particular POSIX extension to C, even if it is not portable in practice
to a pure C environment.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to