From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOWF5-000101-S8 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:50:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOWEz-0000T1-Lb for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:49:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOWEz-0000Si-DF for qemu-devel@nongnu.org; Fri, 14 Mar 2014 13:49:53 -0400 Date: Fri, 14 Mar 2014 17:49:47 +0000 From: "Richard W.M. Jones" Message-ID: <20140314174947.GW1346@redhat.com> References: <3096076082478dafe78553ab5cbd8b572904cbc4.1394794127.git.jcody@redhat.com> <20140314153639.GD1985@redhat.com> <20140314155742.GU1346@redhat.com> <53232D9E.2010002@redhat.com> <20140314165109.GV1346@redhat.com> <53233BEB.2090102@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53233BEB.2090102@redhat.com> Subject: Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Kevin Wolf , Peter Maydell , Jeff Cody , QEMU Developers , Alexander Graf , Stefan Hajnoczi 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 6.3.1.8) 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. Rich. -- 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