Skip to content

Commit

Permalink
- converted s_test_schlib shifts of -1 to equivalent shifts of 1 to
Browse files Browse the repository at this point in the history
  avoid undefined left-shift behavior on negative numbers.
    prim5.c
  • Loading branch information
dybvig committed Apr 26, 2016
1 parent 42e6fed commit 7427dda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions LOG
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@
zlib and nanopass, since they are logically part of the git clone.
It does run make distclean in zlib.
makefiles/Makefile.in
- converted s_test_schlib shifts of -1 to equivalent shifts of 1 to
avoid undefined left-shift behavior on negative numbers.
prim5.c
4 changes: 2 additions & 2 deletions c/prim5.c
Original file line number Diff line number Diff line change
Expand Up @@ -1686,8 +1686,8 @@ static void s_test_schlib() {
INT test = 0;
I32 n1 = 0x73215609;
I64 n2 = n1 * 37;
I32 n3 = (I32)-1<<31;
I64 n4 = (I64)-1<<63;
I32 n3 = (I32)1<<31;
I64 n4 = (I64)1<<63;
I32 n5 = -1;

SCHLIBTEST(Sinteger_value(Sinteger(n1)) == n1)
Expand Down

0 comments on commit 7427dda

Please sign in to comment.