On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length. Explicitly put a 'ULL' suffix
on those defines.
Reported-by: Alexander Graf ag...@suse.de
Signed-off-by: Jeff Cody jc...@redhat.com
---
block/vhdx.h | 6 +++---
1 file changed, 3
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length. Explicitly put a 'ULL' suffix
on those defines.
Reported-by: Alexander Graf ag...@suse.de
Signed-off-by: Jeff Cody
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length. Explicitly put a 'ULL' suffix
on those defines.
-#define VHDX_FILE_SIGNATURE 0x656C696678646876 /* vhdxfile in ASCII */
On 14 March 2014 15:36, Richard W.M. Jones rjo...@redhat.com wrote:
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length. Explicitly put a 'ULL' suffix
on those defines.
On Fri, Mar 14, 2014 at 03:38:55PM +, Peter Maydell wrote:
On 14 March 2014 15:36, Richard W.M. Jones rjo...@redhat.com wrote:
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are
On 03/14/14 16:36, Richard W.M. Jones wrote:
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length. Explicitly put a 'ULL' suffix
on those defines.
-#define
On 03/14/14 16:57, Richard W.M. Jones wrote:
On Fri, Mar 14, 2014 at 03:38:55PM +, Peter Maydell wrote:
On 14 March 2014 15:36, Richard W.M. Jones rjo...@redhat.com wrote:
On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
On 32-bit hosts, some compilers will warn on too large
On 14 March 2014 16:17, Laszlo Ersek ler...@redhat.com wrote:
Unsigned long long is a gnu-ism for C89. It's a standard part of C99.
Last time I checked, qemu used the gnu89 dialect on all build hosts
except SunOS.
HACKING says we use C99...
-- PMM
On 03/14/14 17:26, Peter Maydell wrote:
On 14 March 2014 16:17, Laszlo Ersek ler...@redhat.com wrote:
Unsigned long long is a gnu-ism for C89. It's a standard part of C99.
Last time I checked, qemu used the gnu89 dialect on all build hosts
except SunOS.
HACKING says we use C99...
HACKING
On 03/14/14 17:35, Laszlo Ersek wrote:
On 03/14/14 17:26, Peter Maydell wrote:
On 14 March 2014 16:17, Laszlo Ersek ler...@redhat.com wrote:
Unsigned long long is a gnu-ism for C89. It's a standard part of C99.
Last time I checked, qemu used the gnu89 dialect on all build hosts
except SunOS.
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
On 14 March 2014 16:35, Laszlo Ersek ler...@redhat.com wrote:
On 03/14/14 17:26, Peter Maydell wrote:
On 14 March 2014 16:17, Laszlo Ersek ler...@redhat.com wrote:
Unsigned long long is a gnu-ism for C89. It's a standard part of C99.
Last time I checked, qemu used the gnu89 dialect on all
On 03/14/14 17:51, Richard W.M. Jones wrote:
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
On 03/14/14 18:08, Peter Maydell wrote:
On 14 March 2014 16:35, Laszlo Ersek ler...@redhat.com wrote:
On 03/14/14 17:26, Peter Maydell wrote:
On 14 March 2014 16:17, Laszlo Ersek ler...@redhat.com wrote:
Unsigned long long is a gnu-ism for C89. It's a standard part of C99.
Last time I
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
On 03/14/14 18:49, Richard W.M. Jones wrote:
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
On 14 March 2014 17:42, Laszlo Ersek ler...@redhat.com wrote:
However, it wouldn't be an immediate, transparent change. For example,
out-of-range left-shifting for a signed int is explicitly undefined
behavior in C99 (6.5.7p4) -- equally for shifting left a negative value
-- and the argument
On 03/14/14 19:22, Peter Maydell wrote:
On 14 March 2014 17:42, Laszlo Ersek ler...@redhat.com wrote:
However, it wouldn't be an immediate, transparent change. For example,
out-of-range left-shifting for a signed int is explicitly undefined
behavior in C99 (6.5.7p4) -- equally for shifting
On 03/14/14 19:49, Laszlo Ersek wrote:
One good example is for 6.4.4.1 Integer constants:
QUIET CHANGE IN C99
Unsuffixed integer constants may have different types in C99 than
in C89. Such constants greater than LONG_MAX are of type unsigned
long in C89,
19 matches
Mail list logo