summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stdlib/nativeint.ml4
-rw-r--r--stdlib/nativeint.mli4
-rw-r--r--test/Moretest/bigarrays.ml12
3 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/nativeint.ml b/stdlib/nativeint.ml
index d00c8793a..f706a465d 100644
--- a/stdlib/nativeint.ml
+++ b/stdlib/nativeint.ml
@@ -37,8 +37,8 @@ let minus_one = of_int (-1)
let succ n = add n one
let pred n = sub n one
let abs n = if n >= zero then n else neg n
-let min = shift_left one (Sys.word_size - 1)
-let max = sub min one
+let min_int = shift_left one (Sys.word_size - 1)
+let max_int = sub min_int one
let lognot n = logxor n minus_one
external format : string -> nativeint -> string = "nativeint_format"
diff --git a/stdlib/nativeint.mli b/stdlib/nativeint.mli
index f7ef684a2..555cb69f3 100644
--- a/stdlib/nativeint.mli
+++ b/stdlib/nativeint.mli
@@ -52,11 +52,11 @@ val pred: nativeint -> nativeint
(* Predecessor. [Nativeint.pred x] is [Nativeint.sub x 1n]. *)
val abs: nativeint -> nativeint
(* Return the absolute value of its argument. *)
-val max: nativeint
+val max_int: nativeint
(* The greatest representable native integer,
either $2^{31} - 1$ on a 32-bit platform,
or $2^{63} - 1$ on a 64-bit platform. *)
-val min: nativeint
+val min_int: nativeint
(* The greatest representable native integer,
either $-2^{31}$ on a 32-bit platform,
or $-2^{63}$ on a 64-bit platform. *)
diff --git a/test/Moretest/bigarrays.ml b/test/Moretest/bigarrays.ml
index 4affb5e2f..6455fb5f7 100644
--- a/test/Moretest/bigarrays.ml
+++ b/test/Moretest/bigarrays.ml
@@ -87,16 +87,16 @@ let _ =
[Int32.zero, Int32.zero;
Int32.of_int 123, Int32.of_int 123;
Int32.of_int (-456), Int32.of_int (-456);
- Int32.max, Int32.max;
- Int32.min, Int32.min;
+ Int32.max_int, Int32.max_int;
+ Int32.min_int, Int32.min_int;
Int32.of_string "0x12345678", Int32.of_string "0x12345678"]);
test 7 true
(test_setget int64
[Int64.zero, Int64.zero;
Int64.of_int 123, Int64.of_int 123;
Int64.of_int (-456), Int64.of_int (-456);
- Int64.max, Int64.max;
- Int64.min, Int64.min;
+ Int64.max_int, Int64.max_int;
+ Int64.min_int, Int64.min_int;
Int64.of_string "0x123456789ABCDEF0",
Int64.of_string "0x123456789ABCDEF0"]);
test 8 true
@@ -104,8 +104,8 @@ let _ =
[Nativeint.zero, Nativeint.zero;
Nativeint.of_int 123, Nativeint.of_int 123;
Nativeint.of_int (-456), Nativeint.of_int (-456);
- Nativeint.max, Nativeint.max;
- Nativeint.min, Nativeint.min;
+ Nativeint.max_int, Nativeint.max_int;
+ Nativeint.min_int, Nativeint.min_int;
Nativeint.of_string "0x12345678",
Nativeint.of_string "0x12345678"]);
test 9 true