Skip to content

Commit

Permalink
Fix overflow error when compiling with LLVM 17.
Browse files Browse the repository at this point in the history
  • Loading branch information
antoinemine committed Oct 30, 2023
1 parent ee7fba8 commit f7bb20b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions caml_z_tommath.c
Original file line number Diff line number Diff line change
Expand Up @@ -2048,12 +2048,12 @@ CAMLprim value ml_z_init()
err |= mp_init_i32(&z_max_int32, 0x7fffffff);
err |= mp_init_i32(&z_min_int32, -0x80000000);
err |= mp_init_i64(&z_max_int64, 0x7fffffffffffffffLL);
err |= mp_init_i64(&z_min_int64, -0x8000000000000000LL);
err |= mp_init_i64(&z_min_int64, -0x7fffffffffffffffLL - 1);
#ifdef ARCH_SIXTYFOUR
err |= mp_init_i64(&z_max_int, 0x3fffffffffffffffLL);
err |= mp_init_i64(&z_min_int, -0x4000000000000000LL);
err |= mp_init_i64(&z_max_intnat, 0x7fffffffffffffffLL);
err |= mp_init_i64(&z_min_intnat, -0x8000000000000000LL);
err |= mp_init_i64(&z_min_intnat, -0x7fffffffffffffffLL - 1);
#else
err |= mp_init_i32(&z_max_int, 0x3fffffff);
err |= mp_init_i32(&z_min_int, -0x40000000);
Expand Down

0 comments on commit f7bb20b

Please sign in to comment.