This is the mail archive of the
mailing list for the GCC project.
Re: What to do with argument mismatches in Fortran (was: [patch, fortran] Fix PR 91443)
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: Janne Blomqvist <blomqvist dot janne at gmail dot com>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, gcc at gcc dot gnu dot org
- Date: Tue, 20 Aug 2019 13:12:48 -0700
- Subject: Re: What to do with argument mismatches in Fortran (was: [patch, fortran] Fix PR 91443)
- References: <firstname.lastname@example.org> <CAO9iq9Fj_uwF1ZCsmFOKNcaFK60SX4gfqdZp7XYh1WXQN+Amkw@mail.gmail.com> <email@example.com> <firstname.lastname@example.org>
- Reply-to: sgk at troutmask dot apl dot washington dot edu
On Tue, Aug 20, 2019 at 09:56:27PM +0200, Thomas Koenig wrote:
> I wrote:
> > Committed as r274551.
> Well, this revision appears to have woken quite a few bugs from their
> slumber. While argument mismatch was always illegal, it seems to have
> been a common idiom at one time. And, like almost all bad habits of
> the past, SPEC also has this (see PR 91473, where you can see thatt a
> rather large number of SPEC tests now require -std=legacy).
> So, what to do? Is -std=legacy the right option, or should we add
> something different (like -faccept-argument-mismatch), which we
> could then set by -std=legacy? And is there anything special
> we should be doing after we have diagnoses the problem, if the
> user simply wants to run the code?
Perhaps, something along the lines of -fallow-invalid-boz
I recently introduced. Issue an error be default, but
have -fallow-argument-mismatch downgrades the error to a
warning. The only way to disable the warning is with -w.
Personally, if gfortran can detect an error in code, I think
it should report the error to the user.