caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* A warning about warnings
@ 2009-11-10 16:28 Damien Doligez
  0 siblings, 0 replies; only message in thread
From: Damien Doligez @ 2009-11-10 16:28 UTC (permalink / raw)
  To: caml users

Hello World,

I've been compiling OCaml programs and libraries lately, and I've seen
this kind of things in make output:

    ocamlc -w A -warn-error A ....

or even:

    ocamlc -w Ael -warn-error Ael ....


You should not do that, because it means your build will break with
the next version of OCaml that adds a new warning, even if that
warning is disabled by default for compatibility reasons, as soon
as your code triggers the new warning (which it will do, due to
Murphy's law).

What you should do instead:

    ocamlc -w ELZ -warn-error A ....

and

    ocamlc -w Z -warn-error A ....

Or completely refrain from using -warn-error A and only activate
the error option on explicit sets of warnings.

Better yet, you could remove the -warn-error option from your
released Makefiles, and reserve it for development.

Happy hacking,

-- Damien


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-10 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-10 16:28 A warning about warnings Damien Doligez

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).