X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fcount-one-bits.h;h=fcbe7fda67b967e96f1045c955c083b2a468cdf4;hb=1a2869593e115e4a6c74aaa0b23ca612357403ce;hp=ae8a5a89bf30bb7a9b00868739d710864928d3ce;hpb=d8965b7823ae5167a60fa39ad91b9fdc26280513;p=gnulib.git diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index ae8a5a89b..fcbe7fda6 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h @@ -30,6 +30,8 @@ return BUILTIN (x); #else #define COUNT_ONE_BITS(BUILTIN, TYPE) \ + /* This condition is written so as to avoid shifting by more than \ + 31 bits at once, and also avoids a random HP-UX cc bug. */ \ verify (((TYPE) -1 >> 31 >> 31 >> 2) == 0); /* TYPE has at most 64 bits */ \ int count = count_one_bits_32 (x); \ if (1 < (TYPE) -1 >> 31) /* TYPE has more than 32 bits? */ \