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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 8EFE77F616 for ; Wed, 22 Feb 2017 20:52:58 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=aymeric.fromherz@ens.fr; spf=Pass smtp.mailfrom=aymeric.fromherz@ens.fr; spf=None smtp.helo=postmaster@nef2.ens.fr Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of aymeric.fromherz@ens.fr) identity=pra; client-ip=129.199.96.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="aymeric.fromherz@ens.fr"; x-sender="aymeric.fromherz@ens.fr"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of aymeric.fromherz@ens.fr designates 129.199.96.40 as permitted sender) identity=mailfrom; client-ip=129.199.96.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="aymeric.fromherz@ens.fr"; x-sender="aymeric.fromherz@ens.fr"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nef2.ens.fr) identity=helo; client-ip=129.199.96.40; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="aymeric.fromherz@ens.fr"; x-sender="postmaster@nef2.ens.fr"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AfoWPZBes5eMU2D8BG+YICHz0lGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcS5YB7h7PlgxGXEQZ/co6odzbGH7ua5BydZu8fJmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6?= =?us-ascii?q?OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBW7oR/MusQXjoduN7g9xx/UqXZUZu?= =?us-ascii?q?pawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnF?= =?us-ascii?q?VguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hC?= =?us-ascii?q?oBKjU293zZitFrjKJDvh2uuwB/zYDTYIGQLvV+f6Xdds4eSWdOWstdUipMCZ6+?= =?us-ascii?q?YYQSFeoMJftWoZfzp1UOrhWwCwejC+ztxTBUiXH7xrE63uY7Hg3awAAtEdADvX?= =?us-ascii?q?LJp9v1LqcSVuW1wbHUwDTDavNZxy396InUfRs8of+MR7Vwcc/RyUYxDQPEj0ib?= =?us-ascii?q?pIv/MDKV0+QCrXKb7+t8Wu61hW4nsQZxoj2vxsgykInIh5kYxU7C9SVi2oo1K8?= =?us-ascii?q?e4RVd9bNW5HpVQsCSaOJF3QsMkW2xouSA6yqcHuZGhZiQKxo4nywbfavOdc4iI?= =?us-ascii?q?5RXjWPyNLjd/gXJofq+0iRWq8UW41+HwSM253ExXoidBltTArHQA2h3J5sWIVv?= =?us-ascii?q?dx5lqt1SiL2gzJ9+1JJUQ5mbDGJ5I73LI8iJweulnZECDsgkX5lqqWe10k+ue2?= =?us-ascii?q?7+TnZa3rppmCOI96lA3yKLohmsqkAegiPAgORXCX+eW61LL94U30WKhGguMyn6?= =?us-ascii?q?XDrZzXIcAWqrS9DgJUyIou5AqzAy+j0NsCnHkHKFxFeAiAj4jsI1zBOvD5DfKh?= =?us-ascii?q?jFS2kTdk2+rKPrP7ApXKK3jDkKnufax86kNH1gUzy8tf64haCrEbOP7zQFP+tM?= =?us-ascii?q?TEDh8lNAy52/roB8941oMaQG6PBq6ZMLjOsVKT/eIuI+yMZJcPtzrnKvgl4eTu?= =?us-ascii?q?jX4jllMHc6mpx8hfVHftFf1jJwCdYGHwqtYHC2YD+AQkH8Lwj1jXeC9WamyzVO?= =?us-ascii?q?oS/DY+CI+8H8+XT5GojaaA12G1BJpTZm1cGHiBF2yueZ/SCKREUz6bPsI0ym9M?= =?us-ascii?q?brOmUYJ0iUCj?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AVAwAK661Yhyhgx4FeGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFQEBAQECAQEBAQgBAQEBhAcDgQYBg1qKepBogjqVByqFeAKDB0MUAQE?= =?us-ascii?q?BAQEBAQEBAQESAQEBCA0JCh0vgjMKgjQBBSNLChELGAICBQQSCwICCQMCAQIBM?= =?us-ascii?q?xITBgIBAQ6JSwMVBQmvK4Imhz0Dg3QBAQEHAQEBAQEjgQuFQYRvhSCCOoJfBYc?= =?us-ascii?q?4DJRMa4EXhHKNfY5CkyU2XUQ1I0+EXIFudIoUAQEB?= X-IPAS-Result: =?us-ascii?q?A0AVAwAK661Yhyhgx4FeGgEBAQECAQEBAQgBAQEBFQEBAQE?= =?us-ascii?q?CAQEBAQgBAQEBhAcDgQYBg1qKepBogjqVByqFeAKDB0MUAQEBAQEBAQEBAQESA?= =?us-ascii?q?QEBCA0JCh0vgjMKgjQBBSNLChELGAICBQQSCwICCQMCAQIBMxITBgIBAQ6JSwM?= =?us-ascii?q?VBQmvK4Imhz0Dg3QBAQEHAQEBAQEjgQuFQYRvhSCCOoJfBYc4DJRMa4EXhHKNf?= =?us-ascii?q?Y5CkyU2XUQ1I0+EXIFudIoUAQEB?= X-IronPort-AV: E=Sophos;i="5.35,195,1484002800"; d="scan'208";a="214399045" Received: from nef2.ens.fr ([129.199.96.40]) by mail3-smtp-sop.national.inria.fr with ESMTP; 22 Feb 2017 20:52:57 +0100 Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef2.ens.fr (8.13.6/1.01.28121999) with ESMTP id v1MJqvHu087559 for ; Wed, 22 Feb 2017 20:52:57 +0100 (CET) Received: from smtps.spi.ens.fr ([10.129.0.3]) by clipper.ens.fr (8.14.4/jb-1.1) id v1MJqvGq086896 for ; Wed, 22 Feb 2017 20:52:57 +0100 Received: from [192.168.0.3] using smtps by smtps.spi.ens.fr (8.14.3/jb-1.1) id v1MJqw0Z003376 for ; Wed, 22 Feb 2017 20:52:58 +0100 (authenticated user fromherz) X-ENS-Received: ([176.159.6.225]) X-Envelope-To: To: caml-list@inria.fr References: <20170222170101.GE28111@annexia.org> <20170222173814.GG28111@annexia.org> <2432820.aHjfWRbG44@molnar> <58ADE4A2.9060105@ens.fr> From: Aymeric Fromherz Message-ID: <58ADEDA0.8070704@ens.fr> Date: Wed, 22 Feb 2017 20:59:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (nef2.ens.fr [129.199.96.32]); Wed, 22 Feb 2017 20:52:57 +0100 (CET) Subject: Re: [Caml-list] Warning for unused variables Hi, Trying with OCaml 4.04 on another machine, I have the same behaviour. When running the ocaml interpreter with all warnings activated (-w A option), a warning is raised in the first case, but it is a warning 27 instead of a warning 26. What is the difference between these two warnings? Could it be that you have all warnings activated by default? Thanks, Aymeric On 22/02/2017 20:43, Gabriel Scherer wrote: > This would be a bug, but I cannot reproduce it on my machine, where > all OCaml versions I have (including 4.02.3) raise a warning as > expected. > > On Wed, Feb 22, 2017 at 2:21 PM, Aymeric Fromherz > wrote: >> Hi, >> >> Using OCaml 4.02.3, I do not have a warning for unused variables when >> only one of the variables in a pair is unused. >> For instance, the code >> >> let (a,b) = (0, 42) in b;; >> >> raises no warning, while >> >> let (a,b) = (0,42) in 1;; raises the following >> >> Warning 26: unused variable b. >> Warning 26: unused variable a. >> >> I would have expected a warning in the first case since a is unused. >> >> Warnings for single unused variables, such as let a = 42 in 1 are still >> raised. >> >> What is the reason for this? Is this behaviour intended? How are unused >> variables determined? >> >> Thanks in advance, >> Aymeric Fromherz >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs >