On Mon, 05 Jun 2017 16:32:01 +0200, Christian Weisgerber wrote:

> Todd C. Miller:
> 
> > I think you want 0xffffffffU, not 0xffffffffL.  Otherwise you will
> > have the same issue on i386.
> 
> ???
> 
> We need a constant that comes out as the "long" value
> 0x0000 0000 ffff ffff   on 64-bit platforms
> 0xffff ffff             on 32-bit platforms (degenerate case)

If you assign 0xffffffff to a long on i386 the compiler should warn
about it since it is too big to fit unless the value is unsigned.
That is why ULONG_MAX is defined as defined as 0xffffffffUL on
32-bit platforms.

 - todd

Reply via email to