Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix ADDR_TO_LOC for i386 (32 bit) #62
The address LOC needs to be not negative. The right shift in the original code however may be (implementation dependent) shift in a 1, resulting in a negative LOC:
ISO/IEC 9899/1999, §6.5.8:
We explicitly cast it into an unsigned before rightshifting. This will shift in a zero.
This fixes #61.
We can also remove an ugly "workaround" for this problem in the cl startup shell script.