sparse considers LONG_MAX too big for long on x86-64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sizeof(long) == 8 on x86-64, but sparse thinks LONG_MAX needs a long long:

/tmp$ uname -a
Linux leaf 3.0.0-1-amd64 #1 SMP Wed Aug 17 04:08:52 UTC 2011 x86_64 GNU/Linux
/tmp$ cat test.c
#include <limits.h>
#if LONG_MAX < 0
#endif
/tmp$ sparse test.c
test.c:2:5: warning: constant 9223372036854775807L is so big it is long long
/tmp$ cgcc -c test.c -o /dev/null
test.c:2:5: warning: constant 9223372036854775807L is so big it is long long
/tmp$ echo $((2**63 - 1))
9223372036854775807

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux