diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-01-27 13:28:56 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-01-27 13:28:56 +0000 |
commit | 43a7d2f07eebf9564b497a8697e99653cbfc369f (patch) | |
tree | 6d2f4ebba81c027d8f12e1d9edf416ff8ca1fe90 | |
parent | 216187cfd261ad29034bad506dc108e58f42ada2 (diff) |
document the interval notation for warning sets; use it for default warnings
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12087 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | man/ocamlc.m | 25 | ||||
-rw-r--r-- | utils/warnings.ml | 2 |
2 files changed, 24 insertions, 3 deletions
diff --git a/man/ocamlc.m b/man/ocamlc.m index 44671d76d..02ae97dd0 100644 --- a/man/ocamlc.m +++ b/man/ocamlc.m @@ -501,7 +501,7 @@ invocations of the C compiler and linker in .B \-custom mode. Useful to debug C library problems. .TP -.BR \-vnum\ or \-version +.BR \-vnum \ or\ \-version Print the version number of the compiler in short form (e.g. "3.11.0"), then exit. .TP @@ -543,6 +543,27 @@ between them. A warning specifier is one of the following: \ \ Enable and mark warning number .IR num . +.BI + num1 .. num2 +\ \ Enable all warnings between +.I num1 +and +.I num2 +(inclusive). + +.BI \- num1 .. num2 +\ \ Disable all warnings between +.I num1 +and +.I num2 +(inclusive). + +.BI @ num1 .. num2 +\ \ Enable and mark all warnings between +.I num1 +and +.I num2 +(inclusive). + .BI + letter \ \ Enable the set of warnings corresponding to .IR letter . @@ -722,7 +743,7 @@ mentioned here corresponds to the empty set. .IP The default setting is -.BR \-w\ +a\-4\-6\-9\-27\-29\-32\-33\-34\-35\-36\-37 . +.BR \-w\ +a\-4\-6\-9\-27\-29\-32..37 . Note that warnings .BR 5 \ and \ 10 are not always triggered, depending on the internals of the type checker. diff --git a/utils/warnings.ml b/utils/warnings.ml index a7babcc40..3ca138d51 100644 --- a/utils/warnings.ml +++ b/utils/warnings.ml @@ -200,7 +200,7 @@ let parse_opt flags s = let parse_options errflag s = parse_opt (if errflag then error else active) s;; (* If you change these, don't forget to change them in man/ocamlc.m *) -let defaults_w = "+a-4-6-7-9-27-29-32-33-34-35-36-37";; +let defaults_w = "+a-4-6-7-9-27-29-32..37";; let defaults_warn_error = "-a";; let () = parse_options false defaults_w;; |