public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janus Weil <janus@gcc.gnu.org>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Fix fortran/81509
Date: Sun, 01 Oct 2017 17:42:00 -0000	[thread overview]
Message-ID: <CAKwh3qhHpu+4+o14cW7HtgO+=acXhmetTYD2AF9vY+EtQFOSrQ@mail.gmail.com> (raw)
In-Reply-To: <20170929140847.GA11837@troutmask.apl.washington.edu>

2017-09-29 16:08 GMT+02:00 Steve Kargl <sgk@troutmask.apl.washington.edu>:
> On Fri, Sep 29, 2017 at 11:15:47AM +0200, Janus Weil wrote:
>> Hi Steve,
>>
>> > As aside effect, the patch removes a questionable GNU Fortran
>> > extension that allowed arguments to IAND, IOR, and IEOR to have
>> > different kind type parameters.  The behavior of this extension
>> > was not documented.
>>
>> I don't really like that part. We were using the nice and convenient
>> mechanism of gfc_notify_std here, which allows the developer to choose
>> via the -std flag whether to strictly adhere to a chosen Fortran
>> standard or to allow GNU extensions etc. You're taking away that
>> flexibility and replacing it by an unconditional error. I don't
>> actually think that's a good idea.
>>
>> In general one can argue about whether or not it's a good idea to use
>> non-std extensions. But I think gfortran should rather leave the
>> choice to its users, whether they want to use 'dirty and covenient'
>> code or have very strict checking. We have nice mechanisms for this,
>> and I do think we should keep them.
>>
>
> It is undefined behavior.

... with regards to the F08 standard, which forbids it, yes. I guess
that is the nature of a "non-standard extension". It can still give a
meaningful result, after the smaller kind is implicitly converted to
the larger kind.

Btw, contrary to your earlier claim, the extension is actually
documented: https://gcc.gnu.org/onlinedocs/gfortran/IAND.html


> I withdraw the patch.

Why? It does fix a rejects-valid bug after all, doesn't it? I
completely agree with Paul's earlier review that this is good and
necessary.

All I'm saying is that I don't think it's a good idea to turn the
gfc_notify_std into a gfc_error. If you keep the gfc_notify_std, the
patch is ok for trunk from my side.

Cheers,
Janus

  reply	other threads:[~2017-10-01 17:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-27 19:36 Steve Kargl
2017-09-28  9:46 ` Paul Richard Thomas
2017-09-28 17:41   ` Steve Kargl
2017-09-29  9:15 ` Janus Weil
2017-09-29 14:08   ` Steve Kargl
2017-10-01 17:42     ` Janus Weil [this message]
2017-10-01 18:04       ` Janne Blomqvist
2017-10-01 19:58       ` Steve Kargl
2017-10-03 14:27         ` Janus Weil
2017-10-03 18:10           ` Steve Kargl
2017-10-03 19:38             ` Janus Weil
2017-10-04  6:02               ` 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='CAKwh3qhHpu+4+o14cW7HtgO+=acXhmetTYD2AF9vY+EtQFOSrQ@mail.gmail.com' \
    --to=janus@gcc.gnu.org \
    --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).