From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOVKJ-0001eS-FE for qemu-devel@nongnu.org; Fri, 14 Mar 2014 12:51:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOVKD-0003xh-Gk for qemu-devel@nongnu.org; Fri, 14 Mar 2014 12:51:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59269) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOVKD-0003xV-90 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 12:51:13 -0400 Date: Fri, 14 Mar 2014 16:51:09 +0000 From: "Richard W.M. Jones" Message-ID: <20140314165109.GV1346@redhat.com> References: <3096076082478dafe78553ab5cbd8b572904cbc4.1394794127.git.jcody@redhat.com> <20140314153639.GD1985@redhat.com> <20140314155742.GU1346@redhat.com> <53232D9E.2010002@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <53232D9E.2010002@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 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