warning for empty PM + option -notk for configure

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@3853 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Luc Maranget 2001-10-04 08:39:49 +00:00
parent ac31d40a40
commit d113c2c682
4 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

7
configure vendored
View File

@ -28,6 +28,7 @@ mathlib='-lm'
dllib=''
x11_include_dir=''
x11_lib_dir=''
tk_wanted=yes
tk_defs=''
tk_libs=''
posix_threads=no
@ -68,6 +69,8 @@ while : ; do
x11_lib_dir=$2; shift;;
-with-pthread*|--with-pthread*)
posix_threads=yes;;
-notk|--notk)
tk_wanted=no;;
-tkdefs*|--tkdefs*)
tk_defs=$2; shift;;
-tklibs*|--tklibs*)
@ -1001,7 +1004,9 @@ fi
echo "Configuring LablTk..."
if test "$ostype" = "Cygwin"; then
if test $tk_wanted = no; then
has_tk=false
elif "$ostype" = "Cygwin"; then
has_tk=true
elif test "$x11_include" = "not found" || test "$x11_link" = "not found"; then
echo "X11 not found."

View File

@ -969,12 +969,16 @@ let check_partial tdefs loc casel =
| [] ->
(*
This can occur
- For empty matches generated by ocamlp4
- when all patterns have guards
- For empty matches generated by ocamlp4 (no warning)
- when all patterns have guards (then casel <> [], warning)
Then match should be considered non-exhaustive
(cf. matching.ml) no warning is issued,
users should know what they do
*)
begin match casel with
| [] -> ()
| _ -> Location.prerr_warning loc (Warnings.Partial_match "")
end ;
Partial
| ps::_ ->
match satisfiable tdefs true pss (omega_list ps) with