-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nicolas Williams wrote: > Oh, I think you meant that the L suffix would break on anything other > than LP64 or ILP64 models.
Correct. L means long. On platforms where long is 32 bits, shifting a long value by more than 32 bits will give zero. > I'm not entirely sure of the use of the L > suffix, and perhaps that would be a problem. It would on all platforms in 32 bit mode, and those 64 bit platforms that are P64 such as Windows. There is a LL suffix for 64 bit constants (ie long long) but it isn't universally available. > If you can't find a > constant that works equally well in ILP32 and LP64 then you can use > #ifdefs. But I think that it is possible to have such a constant > without causing compiler warnings And that is exactly what the case was. It is only your compiler that whined! (As a general rule the compilers aren't too good at distinguishing between code that knows what it is doing when mixing different sizes and code that is "broken" when doing so. "broken" means unintentionally losing or retaining portions of the values being used.) > (for one, you can have the literal constant, in decimal). You can't. If a value is too large then the compiler will either error or truncate the most significant part. You can stop the truncation by having the LL (or ULL) suffixes but that isn't standard/portable enough. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkrDpFkACgkQmOOfHg372QRwDACfebSMj2NzQNFFJQuC1RnEUWu6 0WYAoMq2qZm3vLMhadlMQhurfMe0J8lP =arsu -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users