On Tue, 2008-02-26 at 23:35 +0100, aurel wrote: > Avoid infinite loop. > uint64_t >> 64 is an undefined operation > - while (val >> bytes*8) bytes++; > + while (val >> bytes*8 && bytes < 8) bytes++; Wouldn't it make more sense to write the tests in the opposite order, to avoid invoking undefined behavior?