From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDmxO-0002DD-Hv for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:00:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDmxL-0002CR-5E for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:00:09 -0400 Received: from [199.232.76.173] (port=37179 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDmxL-0002CO-06 for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:00:07 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:46375) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KDmxK-0007mc-C6 for qemu-devel@nongnu.org; Tue, 01 Jul 2008 17:00:06 -0400 Received: by fg-out-1718.google.com with SMTP id l26so28064fgb.8 for ; Tue, 01 Jul 2008 14:00:04 -0700 (PDT) Date: Tue, 1 Jul 2008 23:00:02 +0200 From: Jindrich Makovicka Message-ID: <20080701230002.5d47275a@holly> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] target-i386/helper.c: some constants can get truncated on 32bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, with ./configure --target-list=3Dx86_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 =E2=80=98cpu_x86_handle_mmu_fault=E2=80=99: /home/henry/build/qemu/trunk/ta= rget-i386/helper.c:903: warning: integer constant is too large for =E2=80=98long=E2=80=99 type /home/henry/build/qemu/trunk/target-i386/helper.c:933: warning: integer constant is too large for =E2=80=98long=E2=80=99 type /home/henry/build/qemu/trunk/target-i386/helper.c:969: warning: integer constant is too large for =E2=80=98long=E2=80=99 type /home/henry/build/qemu/trunk/target-i386/helper.c:977: warning: integer constant is too large for =E2=80=98long=E2=80=99 type /home/henry/build/qemu/trunk/target-i386/helper.c:1012: warning: integer constant is too large for =E2=80=98long=E2=80=99 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 =20 Regards, --=20 Jindrich Makovicka