diff options
| author | Damien Doligez <damien.doligez-inria.fr> | 2014-08-29 17:14:00 +0000 |
|---|---|---|
| committer | Damien Doligez <damien.doligez-inria.fr> | 2014-08-29 17:14:00 +0000 |
| commit | a18bc7950b385ba1668d5efe7b277591b8638802 (patch) | |
| tree | 783d4ec48b5f99d7697a3d3da783e2d2e304ebce /driver | |
| parent | 499a573b7f411b304c879e6df3fc89bf8198a712 (diff) | |
| download | ocaml-a18bc7950b385ba1668d5efe7b277591b8638802.tar.gz | |
merge changes of version/4.02 from r15121 to r15155
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15168 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'driver')
| -rw-r--r-- | driver/compenv.ml | 1 | ||||
| -rw-r--r-- | driver/main.ml | 1 | ||||
| -rw-r--r-- | driver/main_args.ml | 14 | ||||
| -rw-r--r-- | driver/main_args.mli | 1 | ||||
| -rw-r--r-- | driver/optmain.ml | 1 |
5 files changed, 18 insertions, 0 deletions
diff --git a/driver/compenv.ml b/driver/compenv.ml index 32ecb937e9..82704fd8f9 100644 --- a/driver/compenv.ml +++ b/driver/compenv.ml @@ -169,6 +169,7 @@ let read_OCAMLPARAM ppf position = | "rectypes" -> set "rectypes" [ recursive_types ] v | "safe-string" -> clear "safe-string" [ unsafe_string ] v | "strict-sequence" -> set "strict-sequence" [ strict_sequence ] v + | "strict-formats" -> set "strict-formats" [ strict_formats ] v | "thread" -> set "thread" [ use_threads ] v | "unsafe" -> set "unsafe" [ fast ] v | "verbose" -> set "verbose" [ verbose ] v diff --git a/driver/main.ml b/driver/main.ml index 4b1c7264aa..f8358a0cbd 100644 --- a/driver/main.ml +++ b/driver/main.ml @@ -115,6 +115,7 @@ module Options = Main_args.Make_bytecomp_options (struct let _safe_string = unset unsafe_string let _short_paths = unset real_paths let _strict_sequence = set strict_sequence + let _strict_formats = set strict_formats let _thread = set use_threads let _vmthread = set use_vmthreads let _unsafe = set fast diff --git a/driver/main_args.ml b/driver/main_args.ml index 9d66e2b866..4f9668c750 100644 --- a/driver/main_args.ml +++ b/driver/main_args.ml @@ -453,6 +453,15 @@ let mk_opaque f = \ (reduces necessary recompilation on module change)" ;; +let mk_strict_formats f = + "-strict-formats", Arg.Unit f, + " Reject invalid formats accepted by legacy implementations\n\ + \ (Warning: Invalid formats may behave differently from\n\ + \ previous OCaml versions, and will become always-rejected\n\ + \ in future OCaml versions. You should use this flag\n\ + \ to detect and fix invalid formats.)" +;; + let mk__ f = "-", Arg.String f, "<file> Treat <file> as a file name (even if it starts with `-')" @@ -474,6 +483,7 @@ module type Common_options = sig val _safe_string : unit -> unit val _short_paths : unit -> unit val _strict_sequence : unit -> unit + val _strict_formats : unit -> unit val _unsafe : unit -> unit val _unsafe_string : unit -> unit val _version : unit -> unit @@ -651,6 +661,7 @@ struct mk_safe_string F._safe_string; mk_short_paths F._short_paths; mk_strict_sequence F._strict_sequence; + mk_strict_formats F._strict_formats; mk_thread F._thread; mk_unsafe F._unsafe; mk_unsafe_string F._unsafe_string; @@ -701,6 +712,7 @@ struct mk_short_paths F._short_paths; mk_stdin F._stdin; mk_strict_sequence F._strict_sequence; + mk_strict_formats F._strict_formats; mk_unsafe F._unsafe; mk_unsafe_string F._unsafe_string; mk_version F._version; @@ -767,6 +779,7 @@ struct mk_shared F._shared; mk_short_paths F._short_paths; mk_strict_sequence F._strict_sequence; + mk_strict_formats F._strict_formats; mk_thread F._thread; mk_unsafe F._unsafe; mk_unsafe_string F._unsafe_string; @@ -830,6 +843,7 @@ module Make_opttop_options (F : Opttop_options) = struct mk_short_paths F._short_paths; mk_stdin F._stdin; mk_strict_sequence F._strict_sequence; + mk_strict_formats F._strict_formats; mk_unsafe F._unsafe; mk_unsafe_string F._unsafe_string; mk_version F._version; diff --git a/driver/main_args.mli b/driver/main_args.mli index 9a69c799e8..95b7c69e38 100644 --- a/driver/main_args.mli +++ b/driver/main_args.mli @@ -26,6 +26,7 @@ module type Common_options = sig val _safe_string : unit -> unit val _short_paths : unit -> unit val _strict_sequence : unit -> unit + val _strict_formats : unit -> unit val _unsafe : unit -> unit val _unsafe_string : unit -> unit val _version : unit -> unit diff --git a/driver/optmain.ml b/driver/optmain.ml index cd36e7bd78..947d43073a 100644 --- a/driver/optmain.ml +++ b/driver/optmain.ml @@ -114,6 +114,7 @@ module Options = Main_args.Make_optcomp_options (struct let _safe_string = clear unsafe_string let _short_paths = clear real_paths let _strict_sequence = set strict_sequence + let _strict_formats = set strict_formats let _shared () = shared := true; dlcode := true let _S = set keep_asm_file let _thread = set use_threads |
