From: Thomas Koenig <tkoenig@netcologne.de>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch, fortran] PR 47359 - warnings for constant conversion
Date: Mon, 01 Jun 2015 18:02:00 -0000 [thread overview]
Message-ID: <556C9E11.4090502@netcologne.de> (raw)
In-Reply-To: <20150601134017.GA37949@troutmask.apl.washington.edu>
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 -Wconversoin-extra
and don't warn for
print *,3.141592653589_4
d) Like now: Warn with -Wconversion-extra for both
print *,3.1415926535
and
print *,3.14159265358979_4
What are people's prefrences on this? Should we maybe ask on c.l.f
(where we will get more opinions, certainly also differing)?
Thomas
next prev parent reply other threads:[~2015-06-01 18:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <556B7ED1.4020304@netcologne.de>
[not found] ` <20150531221425.GA34602@troutmask.apl.washington.edu>
2015-06-01 6:34 ` Thomas Koenig
2015-06-01 13:40 ` Steve Kargl
2015-06-01 18:02 ` Thomas Koenig [this message]
2015-06-01 20:10 ` Steve Kargl
2015-06-06 11:35 ` Thomas Koenig
2015-06-06 18:52 ` Steve Kargl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=556C9E11.4090502@netcologne.de \
--to=tkoenig@netcologne.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=sgk@troutmask.apl.washington.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).