From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22512 invoked by alias); 25 Sep 2017 17:12:07 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 22492 invoked by uid 89); 25 Sep 2017 17:12:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=HX-Gm-Message-State:AHPjjUj X-HELO: mail-wr0-f172.google.com Received: from mail-wr0-f172.google.com (HELO mail-wr0-f172.google.com) (209.85.128.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Sep 2017 17:12:05 +0000 Received: by mail-wr0-f172.google.com with SMTP id v109so9010774wrc.1 for ; Mon, 25 Sep 2017 10:12:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=6WjYOVi7iCcmpazhjNmcovv0wekyP18s/8dzyQiBg2Q=; b=VPwggxBZ7+4phmKKqgpiQKTvsAH3z85Bj1QPPtNob8dfRlNzERb2mtuEAU81OReuio cxwFbtaKqnraLNQKhJpn2Y73BN0EnJMTZKvUobMVBq5CxihXAsDuUn6i2f6RdDdh+JPn GT26G4B3kHkIy6X1aRXPFH6DvgAjuuXm4X1KbZL4KOhPxOH3d36vr+j9rzLf3Um1iwY1 mebgydr4freMkojrPe6M5xvgE7u8BHxtZ9NbUg6DACjcqWyYFIgvPyCp3eB1dVfeJIAn xpsp/017bovXRsslXE5c79ALhZ1JvKl4DRPu7hHNHfwIGV8D400ngepGnq8Da3Mr/RCG OOOw== X-Gm-Message-State: AHPjjUj+733LXixJpGtOjjK58rRfowCguOz2/PMF6PNjFuth7ronAWmz X18cSU9SDhcIaVI7QqJXAtsmjq0fyN2fpJdSFi8uS75Cwd4= X-Google-Smtp-Source: AOwi7QCP3TzCrw909ca4fo3sj8JAwGW7uvOQ1dFq/45yK0gzWTBVbvPuvzith4+/qUWCyauaqv3Jo84rr0iseTB3ZyI= X-Received: by 10.223.174.227 with SMTP id y90mr6663499wrc.205.1506359522925; Mon, 25 Sep 2017 10:12:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.130.110 with HTTP; Mon, 25 Sep 2017 10:12:02 -0700 (PDT) In-Reply-To: References: From: Prathamesh Kulkarni Date: Mon, 25 Sep 2017 17:12:00 -0000 Message-ID: Subject: Re: [libgfortran] Replace implicit conversions between enums in io/transfer.c by explicit casts. To: gcc Patches , fortran@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-SW-Source: 2017-09/txt/msg00105.txt.bz2 On 12 September 2017 at 17:08, Prathamesh Kulkarni wrote: > Hi, > I am working on patch for PR78736 > (https://gcc.gnu.org/ml/gcc-patches/2017-09/msg00011.html), > which adds a new warning -Wenum-conversion to C front-end to warn for > implicit conversion between different enums. > The warning in that patch triggered on io/transfer.c for following > implicit conversions: > i) Implicit conversion from unit_mode to file_mode > ii) Implicit conversion from unit_sign_s to unit_sign. > > I was wondering if the warning for above implicit conversions would be > correct since unit_mode > and file_mode are different enums and similarly unit_sign_s and > unit_sign are different enums ? > Or are these warnings false positives ? > > The attached patch makes the conversion explicit to silence the warnings. > Bootstrap+tested on x86_64-unknown-linux-gnu. > Does the patch look OK ? ping https://gcc.gnu.org/ml/fortran/2017-09/msg00036.html Thanks, Prathamesh > > Thanks, > Prathamesh