ack/lang
George Koehler 59b3c10563 Use (arith) 1 << ... when getting the sign bit.
This prevents an overflow reported by @hexcoder- in
https://github.com/davidgiven/ack/issues/56

lang/cem/cpp.ansi/LLlex.c used a plain 1 << ... and caused an overflow
on machines where sizeof(int) < sizeof(long).  Using 1L << ... would
work for now but might fail later if arith became long long.

C doesn't specify whether negative integers use 2's complement or some
other format.  Therefore, (arith) 1 << ... has an undefined value.  It
should still work because the value is some integer where the sign bit
is set and all other bits are clear.

(unsigned arith) 1 << ... would also get the sign bit, but casting it
from unsigned back to signed would make the same undefined value.

(arith) -1 << ... would assume 2's complement.
2017-10-29 17:45:10 -04:00
..
a68s Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
b Tune the installed manual pages. 2017-01-18 23:02:30 -05:00
basic Merge from trunk. 2017-08-06 10:42:16 +02:00
cem Use (arith) 1 << ... when getting the sign bit. 2017-10-29 17:45:10 -04:00
fortran Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
m2 Use (arith) 1 << ... when getting the sign bit. 2017-10-29 17:45:10 -04:00
occam Don't define functions called itoa(), because this causes problems on platforms 2017-07-23 21:19:07 +02:00
pc Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
build.lua We can build our first C file. 2016-08-07 21:56:53 +02:00