caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Damien Doligez <damien.doligez@inria.fr>
To: caml users <caml-list@inria.fr>
Subject: A warning about warnings
Date: Tue, 10 Nov 2009 17:28:26 +0100	[thread overview]
Message-ID: <87FEAEA3-CC6A-46AE-A8AC-51A9AB213B22@inria.fr> (raw)

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


                 reply	other threads:[~2009-11-10 16:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87FEAEA3-CC6A-46AE-A8AC-51A9AB213B22@inria.fr \
    --to=damien.doligez@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).