From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 67176 invoked by alias); 1 Jun 2015 20:10:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 67158 invoked by uid 89); 1 Jun 2015 20:10:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 01 Jun 2015 20:10:52 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t51KAntc043988 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 1 Jun 2015 13:10:49 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t51KAmEU043987; Mon, 1 Jun 2015 13:10:48 -0700 (PDT) (envelope-from sgk) Date: Mon, 01 Jun 2015 20:10:00 -0000 From: Steve Kargl To: Thomas Koenig Cc: "fortran@gcc.gnu.org" , gcc-patches Subject: Re: [patch, fortran] PR 47359 - warnings for constant conversion Message-ID: <20150601201048.GA43914@troutmask.apl.washington.edu> References: <556B7ED1.4020304@netcologne.de> <20150531221425.GA34602@troutmask.apl.washington.edu> <556BFCF0.5030607@netcologne.de> <20150601134017.GA37949@troutmask.apl.washington.edu> <556C9E11.4090502@netcologne.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <556C9E11.4090502@netcologne.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-06/txt/msg00113.txt.bz2 On Mon, Jun 01, 2015 at 08:01:53PM +0200, Thomas Koenig wrote: > Am 01.06.2015 um 15:40 schrieb Steve Kargl: > > On Mon, Jun 01, 2015 at 08:34:24AM +0200, Thomas Koenig wrote: > >> What would be the peferred alternative? > > > Is it possible to detect the _knd suffix? > > Yes, this is possible. > > > If so, no > > warning is my preference as it is never incorrect to > > specify more digits than required for conversion from > > ASCII to an internal representation. This, of course, > > assumes that the compiler doesn't have a bug. > > :-) > > >> > > >> > Comments? > >> > > > I'm not a big fan of a proliferation of options. As long > > as the warning isn't triggered under -Wall, I suppose > > I can live with -Wconversion-extra. > > OK, so we have a few options. > > a) Warn for > > print *,3.1415926535897932 with -Wconversion > > and warn for > > print *,3.1415926535_4 only with -Wconversion-extra > > b) Like a) but supply two options to switch off the respective > warnings. > > c) Warn for > > print *,3.1415926535 with -Wconversion-extra > > and don't warn for > > print *,3.141592653589_4 > This would be my first choice. If a user actually specifies a suffix, I assume that the user has given some thought to the preceding digits. > d) Like now: Warn with -Wconversion-extra for both > > print *,3.1415926535 > > and > > print *,3.14159265358979_4 This would be my second choice. > What are people's prefrences on this? Should we maybe ask on c.l.f > (where we will get more opinions, certainly also differing)? If you ask on c.l.f, you'll get differing opinions and most likely a history lesson on what compilers did 40 years ago and how PL/1 hands the issue. :-) Don't let my person opinion be the sole driver/impediment. I do have a few comments on the patch itself. I'll send those later. -- Steve