[Top][All Lists]

[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 17:49:47 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Mar 14, 2014 at 06:27:07PM +0100, Laszlo Ersek wrote:
> *Why* someone would want to use an integer constant with type
> "uint_least64_t" is a separate matter. One example follows -- assume all
> of the below:
> - suppose you write portable C99 source code,
> - hence you can't take uint64_t for granted,
> - you want a constant that's otherwise small enough to be represented as
> "int",
> - but you want that constant to trigger the "usual arithmetic
> conversions" (see to evaluate expressions that the constant
> participates in in at least 64 bits,
> - you want the narrowest type that allows you to do this.

- You want the code to self-document its intentions.

I don't think ULL does that because it requires people to know that
ULL is at least 64 bits.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org

reply via email to

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