From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2E518385842B; Sun, 12 Sep 2021 22:56:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E518385842B From: "sgk at troutmask dot apl.washington.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/102145] TKR mismatches with -pedantic: -fallow-argument-mismatch does not degrade errors to warnings Date: Sun, 12 Sep 2021 22:56:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: 11.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: sgk at troutmask dot apl.washington.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P5 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Sep 2021 22:56:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102145 --- Comment #8 from Steve Kargl -= -- On Sun, Sep 12, 2021 at 07:34:17PM +0000, rimvydas.jas at gmail dot com wro= te: >=20 > > No, it is not. The -fallow-argument-match option was given to > > user to allow them to compile their broken code. It was decided > > to degrade a error into a warning with this option. If you then > > use an option that wants to PEDANTIC with respect to the requirements > > of the Fortran 66, 77, 90, 95, 2003, 2008, and 2018 standard, then > > you're going to get an error. > Nobody said -fallow-argument-mismatch should work under say -std=3Df2008 = (and it > is OK if it doesn't). Users complain about -std=3Dlegacy or -std=3Dgnu b= ehavior > and -pedantic acting like -pedantic-errors when it shouldn't. All this d= one > was force users to make haste changes to keep code compiling while distur= bing > sometimes carefully crafted codes or simply splitting units into separate > fortran souces so that compiler "does not see" this information. >=20 Yes, it should behave like -pedantic-errors. Why not ask the people involved in deciding on -fallow-argument-mismatch behavior. An argument mismatch was never permitted under any Fortran standard. It was decided that gfortran would now issue an error if it detected a mismatch. -fallow-argument-mismatch was added to allow users, who refuse to fix their code, the ability to downgrade the error to a warning. If -pedantic changes -fallow-argument-mismatch back to an error, then don't use -pedantic. And, no, the code was not "carefully crafted". Code, which exploits argument mismatch, has always been invalid Fortran. It is time that those codes are fixed.=