diff --git a/src/kernel_services/abstract_interp/fc_float.ml b/src/kernel_services/abstract_interp/fc_float.ml index 3fd653052056c4e4aede01aaa7a01b37fc20652c..748e227d2dd83dd709a9d36b08724a06029ebbd5 100644 --- a/src/kernel_services/abstract_interp/fc_float.ml +++ b/src/kernel_services/abstract_interp/fc_float.ml @@ -58,11 +58,8 @@ let cmp_ieee = (compare: float -> float -> int) are also considered, e.g. "if x < 0.0" is equivalent to "if x < -0.0", which is also equivalent to "F.compare x (-0.0) < 0". This 'compare' operator distinguishes -0. and 0. *) -(* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) -[@@@ warning "-3"] -external compare : float -> float -> int = "float_compare_total" "noalloc" +external compare : float -> float -> int = "float_compare_total" [@@noalloc] let total_compare = compare -[@@@ warning "+3"] let of_float round prec f = round >>% fun () -> round_to_precision prec f @@ -74,10 +71,7 @@ let is_finite f = match classify_float f with | FP_nan | FP_infinite -> false | FP_normal | FP_subnormal | FP_zero -> true -(* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) -[@@@ warning "-3"] -external is_negative : float -> bool = "float_is_negative" "noalloc" -[@@@ warning "+3"] +external is_negative : float -> bool = "float_is_negative" [@@noalloc] let round_to_precision round prec t = if is_single prec diff --git a/src/kernel_services/abstract_interp/fval.ml b/src/kernel_services/abstract_interp/fval.ml index 8bd884baf257cd2d9b9d7af27fd10e6b8337a536..a3771a9b86e7d65a30c5a5fdd7c2dcab18d3c45a 100644 --- a/src/kernel_services/abstract_interp/fval.ml +++ b/src/kernel_services/abstract_interp/fval.ml @@ -59,10 +59,7 @@ module F = struct are also considered, e.g. "if x < 0.0" is equivalent to "if x < -0.0", which is also equivalent to "F.compare x (-0.0) < 0". This 'compare' operator distinguishes -0. and 0. *) - (* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) - [@@@ warning "-3"] - external compare : float -> float -> int = "float_compare_total" "noalloc" - [@@@ warning "+3"] + external compare : float -> float -> int = "float_compare_total" [@@noalloc] let equal f1 f2 = compare f1 f2 = 0 (* The Caml version of compare below is fine but the C version above is diff --git a/src/libraries/stdlib/extlib.ml b/src/libraries/stdlib/extlib.ml index 04d1facd71e8c7df8b9a21aef7b9b054ff26f70b..1877cb944df416118f4d499324ec6dfaa41a3b25 100644 --- a/src/libraries/stdlib/extlib.ml +++ b/src/libraries/stdlib/extlib.ml @@ -330,10 +330,7 @@ let xor x y = if x then not y else y (** {2 Performance} *) (* ************************************************************************* *) -(* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) -[@@@ warning "-3"] -external address_of_value: 'a -> int = "address_of_value" "noalloc" -[@@@ warning "+3"] +external address_of_value: 'a -> int = "address_of_value" [@@noalloc] (* ************************************************************************* *) (** {2 Exception catcher} *) diff --git a/src/libraries/stdlib/extlib.mli b/src/libraries/stdlib/extlib.mli index 7a1204e843cf57bea0b27b12844c5a73774360b1..391de576362035a40b73ea78cfb7f9acabaef5fb 100644 --- a/src/libraries/stdlib/extlib.mli +++ b/src/libraries/stdlib/extlib.mli @@ -331,10 +331,7 @@ val format_string_of_stag: Format.stag -> string (** {2 Performance} *) (* ************************************************************************* *) -(* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) -[@@@ warning "-3"] -external address_of_value: 'a -> int = "address_of_value" "noalloc" -[@@@ warning "+3"] +external address_of_value: 'a -> int = "address_of_value" [@@noalloc] (* ************************************************************************* *) (** {2 Exception catcher} *) diff --git a/src/libraries/utils/floating_point.ml b/src/libraries/utils/floating_point.ml index 63c67cd7a57612bf07140f07269a0442f07bf13f..e86a8df5f1b6cb8e8f746abd8f2ea87dcffac109 100644 --- a/src/libraries/utils/floating_point.ml +++ b/src/libraries/utils/floating_point.ml @@ -29,17 +29,12 @@ let string_of_c_rounding_mode = function | FE_Downward -> "FE_DOWNWARD" | FE_TowardZero -> "FE_TOWARDZERO" -(* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) -[@@@ warning "-3"] - -external set_round_downward: unit -> unit = "set_round_downward" "noalloc" -external set_round_upward: unit -> unit = "set_round_upward" "noalloc" -external set_round_nearest_even: unit -> unit = "set_round_nearest_even" "noalloc" -external set_round_toward_zero : unit -> unit = "set_round_toward_zero" "noalloc" -external get_rounding_mode: unit -> c_rounding_mode = "get_rounding_mode" "noalloc" -external set_rounding_mode: c_rounding_mode -> unit = "set_rounding_mode" "noalloc" - -[@@@ warning "+3"] +external set_round_downward: unit -> unit = "set_round_downward" [@@noalloc] +external set_round_upward: unit -> unit = "set_round_upward" [@@noalloc] +external set_round_nearest_even: unit -> unit = "set_round_nearest_even" [@@noalloc] +external set_round_toward_zero : unit -> unit = "set_round_toward_zero" [@@noalloc] +external get_rounding_mode: unit -> c_rounding_mode = "get_rounding_mode" [@@noalloc] +external set_rounding_mode: c_rounding_mode -> unit = "set_rounding_mode" [@@noalloc] external round_to_single_precision_float: float -> float = "round_to_float" external sys_single_precision_of_string: string -> float = diff --git a/src/plugins/value_types/cvalue.ml b/src/plugins/value_types/cvalue.ml index 4d817854fc534d2de8746f3568c46352a94f8707..6647c539acf0696c7c8f7f84eda30496e9ffe98f 100644 --- a/src/plugins/value_types/cvalue.ml +++ b/src/plugins/value_types/cvalue.ml @@ -714,10 +714,7 @@ module V_Or_Uninitialized = struct let mask_init = 2 let mask_noesc = 1 - (* replace "noalloc" with [@@noalloc] for OCaml version >= 4.03.0 *) - [@@@ warning "-3"] - external get_flags : t -> int = "caml_obj_tag" "noalloc" - [@@@ warning "+3"] + external get_flags : t -> int = "caml_obj_tag" [@@noalloc] let is_initialized v = (get_flags v land mask_init) <> 0 let is_noesc v = (get_flags v land mask_noesc) <> 0