* [Qemu-devel] target-i386/helper.c: some constants can get truncated on 32bit
@ 2008-07-01 21:00 Jindrich Makovicka
0 siblings, 0 replies; only message in thread
From: Jindrich Makovicka @ 2008-07-01 21:00 UTC (permalink / raw)
To: qemu-devel
Hi,
with
./configure --target-list=x86_64-softmmu
32-bit gcc produces warnings about a few constants with an L suffix:
/home/henry/build/qemu/trunk/target-i386/helper.c: In function
‘cpu_x86_handle_mmu_fault’: /home/henry/build/qemu/trunk/target-i386/helper.c:903:
warning: integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:933: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:969: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:977: warning:
integer constant is too large for ‘long’
type /home/henry/build/qemu/trunk/target-i386/helper.c:1012: warning:
integer constant is too large for ‘long’ type
These should be probably defined as long long to avoid truncation:
--- helper.c.orig 2008-06-16 20:25:16.000000000 +0200
+++ helper.c 2008-06-17 12:26:00.000000000 +0200
@@ -822,9 +822,9 @@
#define PHYS_ADDR_MASK 0xfffff000L
#else
# if defined(TARGET_X86_64)
-# define PHYS_ADDR_MASK 0xfffffff000L
+# define PHYS_ADDR_MASK 0xfffffff000LL
# else
-# define PHYS_ADDR_MASK 0xffffff000L
+# define PHYS_ADDR_MASK 0xffffff000LL
# endif
#endif
Regards,
--
Jindrich Makovicka
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-01 21:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-01 21:00 [Qemu-devel] target-i386/helper.c: some constants can get truncated on 32bit Jindrich Makovicka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).