On 13 January 2014 03:24, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > Hi, > > Just a heads up. > I'm seeing a build warning/error on 32bit hosts. > > I'm on: > commit dd089c0a1e928fb80ba8a37983c1b0e9232d1c8b > Merge: 42bf25a 30ef3c7 > Author: Anthony Liguori <aligu...@amazon.com> > Date: Sun Jan 12 17:50:52 2014 -0800 > > gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) > > Best regards, > Edgar > > make: Entering directory `/home/edgari/src/c/qemu/build-qemu' > CC aarch64-linux-user/target-arm/cpu.o > /home/edgari/src/c/qemu/qemu/target-arm/cpu.c: In function > ‘arm_cpu_register_types’: > /home/edgari/src/c/qemu/qemu/target-arm/cpu.c:1049:5: error: comparison of > unsigned expression < 0 is always false [-Werror=type-limits]
Ah, this is because for the aarch64 linux-user target the 32-bit cpus array is empty. I don't think it's a specific 32-bit hosts issue, it presumably just depends on whether your C compiler complains about it or not. I build with 4.6.3, which doesn't. We had this with cpu64.c too (for a different reason) so I think the best thing here is just to switch these two arrays to loop until they hit a terminator rather than using ARRAY_SIZE. thanks -- PMM