ack/lang/m2/comp
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
..
BigPars Always use unsigned long. 2017-10-28 17:56:20 -04:00
build.lua Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
casestat.xc Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
char.tab fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
chk_expr.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
chk_expr.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
class.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
code.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
cstoper.c Use (arith) 1 << ... when getting the sign bit. 2017-10-29 17:45:10 -04:00
debug.h Modula-2 now works. 2013-05-14 22:24:38 +01:00
declar.g Modula-2 now works. 2013-05-14 22:24:38 +01:00
def.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
def.xh Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
defmodule.c No longer truncate module names at 10 characters when constructing paths; 2017-01-07 23:00:52 +01:00
desig.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
desig.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
em_m2.6 Tune the installed manual pages. 2017-01-18 23:02:30 -05:00
enter.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
error.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
expression.g Modula-2 now works. 2013-05-14 22:24:38 +01:00
f_info.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
idf.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
idf.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
input.c Ansification and warning fixes. 2017-08-06 11:58:36 +02:00
input.h Modula-2 now works. 2013-05-14 22:24:38 +01:00
LLlex.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
LLlex.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
LLmessage.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
lookup.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
main.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
main.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
make.allocd Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.) 2006-07-18 16:45:57 +00:00
make.hfiles Now avoids piping shell scripts into a new instance of sh, instead 2006-07-26 12:29:47 +00:00
make.next fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
make.parameters The Modula-2 compiler now builds. 2016-08-13 00:02:21 +02:00
make.tokcase fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
make.tokfile fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
misc.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
misc.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
modula-2.1 Update man page not to mention the filename length restriction removed in 2017-08-02 00:07:51 +02:00
node.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
node.xh Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
options fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
options.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
program.g Modula-2 now works. 2013-05-14 22:24:38 +01:00
proto.main fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
proto.make fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
real.xh Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
scope.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
scope.xc Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
SmallPars Always use unsigned long. 2017-10-28 17:56:20 -04:00
stab.c Add enough return types to the K&R C that the ACK builds (on Linux) using clang 2016-11-10 22:04:18 +01:00
standards.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
statement.g Modula-2 now works. 2013-05-14 22:24:38 +01:00
SYSTEM.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
tmpvar.xc Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
tokenname.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
tokenname.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00
type.c Use (arith) 1 << ... when getting the sign bit. 2017-10-29 17:45:10 -04:00
type.xh Attempt to correct file system case sensitivity. 2017-08-06 11:15:53 +02:00
typequiv.c Modula-2 now works. 2013-05-14 22:24:38 +01:00
walk.c Improve confusing error message when calling function procedures from a 2017-01-08 11:25:57 +01:00
walk.h Modula-2 now works. 2013-05-14 22:24:38 +01:00
warning.h fixup commit for tag 'llgen-1-0' 2006-02-04 00:57:05 +00:00