From 5a6e7ce1723624ea63257d330cc05407f392b393 Mon Sep 17 00:00:00 2001 From: Mark Pizzolato Date: Wed, 12 Oct 2016 04:28:37 -0700 Subject: [PATCH] BESM6: Fix compiler warning (left shift of negative value) --- BESM6/besm6_arith.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BESM6/besm6_arith.c b/BESM6/besm6_arith.c index a5e4565f..948a6024 100644 --- a/BESM6/besm6_arith.c +++ b/BESM6/besm6_arith.c @@ -257,7 +257,7 @@ void besm6_add (t_value val, int negate_acc, int negate_val) * non-restoring division */ #define ABS(x) ((x) < 0 ? -x : x) -#define INT64(x) ((x) & BIT41 ? (-1LL << 40) | (x) : x) +#define INT64(x) ((x) & BIT41 ? (0xFFFFFFFFFFFFFFFFLL << 40) | (x) : x) static alureg_t nrdiv (alureg_t n, alureg_t d) { t_int64 nn, dd, q, res;