projects
/
mit-scheme.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
417307e
)
Avoid shift of negative, which is undefined in C.
author
Taylor R Campbell
<campbell@mumble.net>
Sun, 21 Jan 2018 15:52:51 +0000
(15:52 +0000)
committer
Taylor R Campbell
<campbell@mumble.net>
Sun, 21 Jan 2018 15:52:51 +0000
(15:52 +0000)
src/microcode/bignmint.h
patch
|
blob
|
history
diff --git
a/src/microcode/bignmint.h
b/src/microcode/bignmint.h
index d1c3c02cc4e13fc207e2173b3506f7bfd5094ada..8f9d904a5673e292a1ca90f2001551fb7a0f1626 100644
(file)
--- a/
src/microcode/bignmint.h
+++ b/
src/microcode/bignmint.h
@@
-118,7
+118,8
@@
extern void abort ();
((BIGNUM_RADIX / BIGNUM_DIGIT_LENGTH) - BIGNUM_DIGIT_LENGTH)
#define BIGNUM_DIGIT(c) ((bignum_digit_type) (c))
-#define BIGNUM_DIGIT_ONES(n) (~ ((~ (BIGNUM_DIGIT (0))) << (n)))
+#define BIGNUM_DIGIT_ONES(n) \
+ ((bignum_digit_type) (~ ((~ ((uintmax_t) (0))) << (n))))
#define BIGNUM_START_PTR(bignum) \
((BIGNUM_TO_POINTER (bignum)) + 1)