Peter Maydell <peter.mayd...@linaro.org> writes: > On 24 February 2015 at 18:39, Markus Armbruster <arm...@redhat.com> wrote: >> Eric Blake <ebl...@redhat.com> writes: >>> Because 0x8000000000000000u is only required to be a 'long', and on >>> 32-bit machines, your constant would overflow long. See, for example, >>> commit 5cb6be2ca. You NEED the 'll' suffix to ensure that the compiler >>> doesn't reject the constant as an overflow. >> >> Not true. > > You need ULL because certain versions of gcc will warn if you do > not. (I have a feeling this includes the elderly gcc I currently > use for mingw builds.) You could argue that this is a gcc bug, and > somebody probably did given that newer gcc don't warn about this. > However we should always use ULL (or LL) for 64-bit constants, > to avoid confusing those versions of gcc.
Working around compiler bugs is a perfectly good reason to ull big constants.