From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 1B1FEBC37 for ; Tue, 10 Nov 2009 17:28:28 +0100 (CET) X-IronPort-AV: E=Sophos;i="4.44,717,1249250400"; d="scan'208";a="50118043" Received: from macabane.dapa.lip6.fr (HELO [192.168.1.100]) ([132.227.203.15]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 10 Nov 2009 17:28:28 +0100 Message-Id: <87FEAEA3-CC6A-46AE-A8AC-51A9AB213B22@inria.fr> From: Damien Doligez To: caml users Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: A warning about warnings Date: Tue, 10 Nov 2009 17:28:26 +0100 X-Mailer: Apple Mail (2.936) X-Spam: no; 0.00; damien:01 damien:01 ocaml:01 ocamlc:01 -warn-error:01 ocamlc:01 -warn-error:01 ocaml:01 makefiles:01 doligez:01 doligez:01 compiling:02 output:02 warnings:03 warnings:03 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