From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7CD23858D34; Sun, 12 Sep 2021 19:34:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7CD23858D34 From: "rimvydas.jas at gmail dot com" 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 19:34:17 +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: rimvydas.jas at gmail dot com 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 19:34:18 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102145 --- Comment #7 from Rimvydas (RJ) --- (In reply to kargl from comment #6) > Well, that's what it should do! Argument mismatch has never > been permitted by any Fortran standard. So, PEDANTICALLY > speaking it is an error to allow. Pedantically it an error to support *any* extension then. > > Without going into unrelated and even mildly disheartening long paragra= phs > > without useful information, most of this started with removal of > > -Wargument-mismatch option. >=20 > No, it started when gfortran grew the ability to diagnosis the > the problem. It is an error. gfortran is telling the user > it is an error.=20=20 Gfortran was able to diagnose most of these before under -Wargument-mismatc= h. > 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 (a= nd it is OK if it doesn't). Users complain about -std=3Dlegacy or -std=3Dgnu beh= avior and -pedantic acting like -pedantic-errors when it shouldn't. All this done was force users to make haste changes to keep code compiling while disturbi= ng sometimes carefully crafted codes or simply splitting units into separate fortran souces so that compiler "does not see" this information.=