caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Why doesn't ocamlopt detect a missing ; after failwith statement?
@ 2004-11-25 20:46 Richard Jones
  2004-11-25 21:14 ` [Caml-list] " Nicolas Cannasse
  0 siblings, 1 reply; 24+ messages in thread
From: Richard Jones @ 2004-11-25 20:46 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]


--------------------------------------------------------------- t.ml --
let () =
  if false then
    failwith "Failed ..." (* ; *)
  prerr_endline "OK"
----------------------------------------------------------------------

Compiled with ocamlopt.opt:

$ ocamlopt.opt t.ml
$ ./a.out 
$

(it prints nothing).  If I uncomment/add the ';', then it prints the
OK message:

$ ocamlopt.opt t.ml
$ ./a.out 
OK

All well and good, but I don't understand why it doesn't warn me about
the missing ';' in the first case.

Rich.

-- 
Richard Jones.  http://www.annexia.org/  http://www.j-london.com/
>>>   http://www.team-notepad.com/ - collaboration tools for teams   <<<
Merjis Ltd. http://www.merjis.com/ - improving website return on investment
http://execellence.co.uk/ - Interim and executive recruitment

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2004-11-29 11:43 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-25 20:46 Why doesn't ocamlopt detect a missing ; after failwith statement? Richard Jones
2004-11-25 21:14 ` [Caml-list] " Nicolas Cannasse
2004-11-26  0:11   ` skaller
2004-11-26  0:44     ` Jacques Garrigue
2004-11-26  3:08       ` skaller
2004-11-26  5:25         ` Jacques Garrigue
2004-11-26  7:08           ` Nicolas Cannasse
2004-11-26 14:42             ` Jacques Garrigue
2004-11-26 17:01               ` Alain Frisch
2004-11-26 19:36             ` Michal Moskal
2004-11-26 17:01           ` Damien Doligez
2004-11-29  0:40             ` Jacques Garrigue
2004-11-29 11:07               ` [Caml-list] Why doesn't ocamlopt detect a missing ; afterfailwith statement? Frederic van der Plancke
2004-11-29 11:43                 ` Jacques Garrigue
2004-11-29 11:27               ` Frederic van der Plancke
2004-11-26 22:24           ` [Caml-list] Why doesn't ocamlopt detect a missing ; after failwith statement? Hendrik Tews
2004-11-27  3:47             ` skaller
2004-11-29  0:01             ` Jacques Garrigue
2004-11-29  7:52               ` Marcin 'Qrczak' Kowalczyk
2004-11-26  3:58       ` skaller
2004-11-26 19:16     ` Brian Hurt
2004-11-26  9:01   ` Richard Jones
2004-11-26  9:56     ` skaller
2004-11-26 13:32     ` Ville-Pertti Keinonen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).