bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

function 'nbits' in 'reduce.c' dies on /360


From: Lorinczy Zsigmond
Subject: function 'nbits' in 'reduce.c' dies on /360
Date: Fri, 27 Apr 2001 16:06:27 +0100

Hello!

Our computer has a /360 compatibe processor, which generates
exception when changing the sign of value X'80000000'.
To avoid this I offer next the modification in this function:

old:
  while (i != 0) {
    i ^= (i & ((unsigned) (- (int) i)));
    ++count;
  }

new:
  while (i != 0) {
    i = (i & (i-1));
    ++count;
  }

Lorinczy Zsigmond



reply via email to

[Prev in Thread] Current Thread [Next in Thread]