diff options
| author | Damien Doligez <damien.doligez-inria.fr> | 2014-04-29 13:56:38 +0000 |
|---|---|---|
| committer | Damien Doligez <damien.doligez-inria.fr> | 2014-04-29 13:56:38 +0000 |
| commit | ab501bc4f6aa8df2e4be4c39fbc30efd0fa5f186 (patch) | |
| tree | 6bc8f4b63e134a548f44ab81e189dcb8bf48f1ab | |
| parent | a5d2ae260438d71bbaa9e575b97766449842c496 (diff) | |
| download | ocaml-ab501bc4f6aa8df2e4be4c39fbc30efd0fa5f186.tar.gz | |
add options -safe-string and -unsafe-string to the compilers and toplevel
git-svn-id: http://caml.inria.fr/svn/ocamldoc/trunk@14706 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
| -rw-r--r-- | manual/manual/cmds/comp.etex | 11 | ||||
| -rw-r--r-- | manual/manual/cmds/native.etex | 14 | ||||
| -rw-r--r-- | manual/manual/cmds/top.etex | 11 |
3 files changed, 35 insertions, 1 deletions
diff --git a/manual/manual/cmds/comp.etex b/manual/manual/cmds/comp.etex index 9739f73e5d..9e659fdcfa 100644 --- a/manual/manual/cmds/comp.etex +++ b/manual/manual/cmds/comp.etex @@ -365,6 +365,11 @@ only if the OCaml compiler was configured with option runtime, which is useful for debugging pointer problems in low-level code such as C stubs. +\item["-safe-string"] +Enforce the separation between types "string" and "bytes", +thereby making strings read-only. This will become the default in +a future version of OCaml. + \item["-short-paths"] When a type is visible under several module-paths, use the shortest one when printing the type's name in inferred interfaces and error and @@ -383,6 +388,12 @@ Turn bound checking off for array and string accesses (the "v.(i)" and slightly faster, but unsafe: anything can happen if the program accesses an array or string outside of its bounds. +\item["-unsafe-string"] +Identify the types "string" and "bytes", +thereby making strings writable. For reasons of backward compatibility, +this is the default setting for the moment, but this will change in a future +version of OCaml. + \item["-use-runtime" \var{runtime-name}] Generate a bytecode executable file that can be executed on the custom runtime system \var{runtime-name}, built earlier with diff --git a/manual/manual/cmds/native.etex b/manual/manual/cmds/native.etex index 733e1fd72b..f9c5c38857 100644 --- a/manual/manual/cmds/native.etex +++ b/manual/manual/cmds/native.etex @@ -156,7 +156,8 @@ Print the version number of "ocamlopt" and a detailed summary of its configuration, then exit. \item["-for-pack" \var{module-path}] -Generate an object file (".cmx" and ".o"/".obj" files) that can later be included +Generate an object file (".cmx" and ".o"/".obj" files) that can later be +included as a sub-module (with the given access path) of a compilation unit constructed with "-pack". For instance, "ocamlopt -for-pack P -c A.ml" will generate "a.cmx" and "a.o" files that can later be used with @@ -374,6 +375,11 @@ been compiled without the "-nodynlink" flag. Some constraints might also apply to the way the extra native objects have been compiled (under Linux AMD 64, they must contain only position-independent code). +\item["-safe-string"] +Enforce the separation between types "string" and "bytes", +thereby making strings read-only. This will become the default in +a future version of OCaml. + \item["-short-paths"] When a type is visible under several module-paths, use the shortest one when printing the type's name in inferred interfaces and error and @@ -396,6 +402,12 @@ With "-unsafe", an integer division (or modulus) by zero can halt the program or continue with an unspecified result instead of raising a "Division_by_zero" exception. +\item["-unsafe-string"] +Identify the types "string" and "bytes", +thereby making strings writable. For reasons of backward compatibility, +this is the default setting for the moment, but this will change in a future +version of OCaml. + \item["-v"] Print the version number of the compiler and the location of the standard library directory, then exit. diff --git a/manual/manual/cmds/top.etex b/manual/manual/cmds/top.etex index b6af282f11..6323bc8ebb 100644 --- a/manual/manual/cmds/top.etex +++ b/manual/manual/cmds/top.etex @@ -202,6 +202,11 @@ Allow arbitrary recursive types during type-checking. By default, only recursive types where the recursion goes through an object type are supported. +\item["-safe-string"] +Enforce the separation between types "string" and "bytes", +thereby making strings read-only. This will become the default in +a future version of OCaml. + \item["-short-paths"] When a type is visible under several module-paths, use the shortest one when printing the type's name in inferred interfaces and error and @@ -221,6 +226,12 @@ Turn bound checking off on array and string accesses (the "v.(i)" and slightly faster, but unsafe: anything can happen if the program accesses an array or string outside of its bounds. +\item["-unsafe-string"] +Identify the types "string" and "bytes", +thereby making strings writable. For reasons of backward compatibility, +this is the default setting for the moment, but this will change in a future +version of OCaml. + \item["-version"] Print version string and exit. |
