[lkml]   [2003]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] make jiffies wrap 5 min after boot
Muli Ben-Yehuda <> writes:
>> I have no idea if that's what wli meant, but -1UL is only "all ones"
>> in a 2's complement binary representation.

On Sun, Feb 16, 2003 at 12:50:34PM +0100, Falk Hueffner wrote:
> No. Wraparound of unsigned types is well-defined. -1UL must be the
> largest possible unsigned long value, which must consist of only 1
> bits (except for possible padding bits).
> Of course, no machines with ones-complement (or padding bits, or
> integer trap representations, or any of the other ISO braindamages)
> exist, so this is mostly irrelevant anyway.

In the "obvious" sense, -1UL is an oxymoron, as -1 is inherently signed,
and the "UL" says "unsigned".

It's aesthetic. It's a violation of what I consider good taste to
do signed bit twiddling on an unsigned value and/or vice-versa.
Regardless of what ISO and/or Linux may or may not support, the habits
ingrained in me wrt. portability say the assumption must not be made.


-- wli
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:33    [W:0.054 / U:1.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site