qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long'


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants
Date: Fri, 14 Mar 2014 16:51:09 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Mar 14, 2014 at 05:26:06PM +0100, Laszlo Ersek wrote:
> (b) UINT64_C() is for "uint_least64_t" (7.18.4.1 Macros for
> minimum-width integer constants). "uint_least64_t" is a required type
> (7.18.1.2 Minimum-width integer types).
> 
> In practice I'd say it doesn't matter which one we use:
> - ULL suffix is gnu89,
> - UINT64_C() macro is gnu89,
> - "unsigned long long" could be wider in general than 64 bits,
> - "uint_least64_t" too could be wider in general than 64 bits,
> - for us both results in uint64_t exactly.
> 
> So the above is a tie, but the ULL suffix is just nicer. (IMHO :))

Interesting discussion here:

https://stackoverflow.com/questions/16360828/what-is-the-purpose-of-macros-for-minimum-width-integer-constants

suggesting that these macros aren't well-specified.  Ho hum.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top



reply via email to

[Prev in Thread] Current Thread [Next in Thread]