On 14/04/2015 16:35, Eric Blake wrote: > On 04/14/2015 08:29 AM, Paolo Bonzini wrote: >> But you can: gsize is defined to be "An unsigned integer type of >> the result of the sizeof operator, corresponding to the size_t >> type defined in C99. > > Good so far. > >> This type is wide enough to hold the numeric value of a pointer, > > Not true on platforms where size_t is 32 bits but pointers are 64 > bits.
Are there any? I don't think QEMU supports them anyway. Paolo > Bug in glib documentation. > >> >> If anything, I would add a QEMU_BUILD_BUG_ON(sizeof(gsize) != >> sizeof(size_t)) to catch the problem, since we've had many >> experienced developers caught unprepared. > > That would be my preference as well. >