From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 327807EEFA for ; Thu, 12 Nov 2015 13:24:29 +0100 (CET) IronPort-PHdr: 9a23:G6g38hP+mi2PR23jqUQl6mtUPXoX/o7sNwtQ0KIMzox0KP/7rarrMEGX3/hxlliBBdydsKIZzbKO+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuStOU15z//tvx0qOQSj0AvCC6b7J2IUf+hiTqne5Sv7FfLL0swADCuHpCdrce72ppIVWOg0S0vZ/or9YwuxhX7vko8soFVaThY4w5S6ZZBXIoKTMb/sru4FPmV03HxnYGSC9exh9JGBTI9hH3RI3ZvDH3u+xwxG+WMJulHvgPRT2+4vIzG1fTgyAdOmth/Q== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=misterherr@freenet.de; spf=None smtp.mailfrom=misterherr@freenet.de; spf=None smtp.helo=postmaster@mout0.freenet.de Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of misterherr@freenet.de) identity=pra; client-ip=195.4.92.90; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="misterherr@freenet.de"; x-sender="misterherr@freenet.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of misterherr@freenet.de) identity=mailfrom; client-ip=195.4.92.90; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="misterherr@freenet.de"; x-sender="misterherr@freenet.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout0.freenet.de) identity=helo; client-ip=195.4.92.90; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="misterherr@freenet.de"; x-sender="postmaster@mout0.freenet.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AVAgCDhERWnFpcBMNegw/AMgEBCIFkgz2CUwKBMD4OAQEBAQEBAQEQAQEBAQEGDQkJIS6CLYIIAQEEI1URCxgCAgUWCwICCQMCAQIBRRMIAQGIFAEWAwGzCIswCYEyAYN+AQshgQGKUYUngk6BRAWWSAGPAYc+BI82g3I+AQEBBoJDgV6GLgEBAQ X-IPAS-Result: A0AVAgCDhERWnFpcBMNegw/AMgEBCIFkgz2CUwKBMD4OAQEBAQEBAQEQAQEBAQEGDQkJIS6CLYIIAQEEI1URCxgCAgUWCwICCQMCAQIBRRMIAQGIFAEWAwGzCIswCYEyAYN+AQshgQGKUYUngk6BRAWWSAGPAYc+BI82g3I+AQEBBoJDgV6GLgEBAQ X-IronPort-AV: E=Sophos;i="5.20,281,1444687200"; d="scan'208";a="187204901" Received: from mout0.freenet.de ([195.4.92.90]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Nov 2015 13:24:28 +0100 Received: from [195.4.92.141] (helo=mjail1.freenet.de) by mout0.freenet.de with esmtpa (ID misterherr@freenet.de) (port 25) (Exim 4.85 #1) id 1ZwqvT-0008W4-Gz for caml-list@inria.fr; Thu, 12 Nov 2015 13:24:27 +0100 Received: from localhost ([::1]:44204 helo=mjail1.freenet.de) by mjail1.freenet.de with esmtpa (ID misterherr@freenet.de) (Exim 4.85 #1) id 1ZwqvT-00018c-CI for caml-list@inria.fr; Thu, 12 Nov 2015 13:24:27 +0100 Received: from mx4.freenet.de ([195.4.92.14]:47397) by mjail1.freenet.de with esmtpa (ID misterherr@freenet.de) (Exim 4.85 #1) id 1Zwqsv-0003UD-HI for caml-list@inria.fr; Thu, 12 Nov 2015 13:21:49 +0100 Received: from [2001:6f8:1c00:fb::2] (port=59131 helo=suse132-intel.home.loc) by mx4.freenet.de with esmtpsa (ID misterherr@freenet.de) (TLSv1.2:DHE-RSA-AES128-SHA:128) (port 465) (Exim 4.85 #1) id 1Zwqsv-0006ne-CE for caml-list@inria.fr; Thu, 12 Nov 2015 13:21:49 +0100 To: caml-list@inria.fr References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3F4C5@IRSMSX102.ger.corp.intel.com> From: "Mr. Herr" X-Enigmail-Draft-Status: N1110 Message-ID: <5644845B.6000801@freenet.de> Date: Thu, 12 Nov 2015 13:21:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3F4C5@IRSMSX102.ger.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originated-At: 2001:6f8:1c00:fb::2!59131 Subject: Re: [Caml-list] Suppress warning from within Ocaml source file On 12.11.2015 09:49, Soegtrop, Michael wrote: > Dear OCaml users, > > Is there a way to suppress warnings from inside an Ocaml source file? I know I can do this from the ocamlc command line, but I want to suppress the warning only in specific cases and I think I should put a comment on why something is suppressed. From my C background I am used to #pragma warning and find it quite convenient. > > The specific warning I want to suppress is Warning 23: "all the fields are explicitly listed in this record: the 'with' clause is useless". I have a case where I might want to extend a record in the future and if I do so the with clause most likely would make sense, so I want to keep the with clause, even though it is superfluous right now. On the other hand: it is quite possible that your with-construct is more harmful than useful: when extending the record, the compiler will not flag the lines in your code you have to check. /Str.