From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7C42C385842D; Sun, 12 Sep 2021 23:40:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C42C385842D 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 23:40:31 +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 23:40:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102145 --- Comment #9 from Rimvydas (RJ) --- (In reply to Steve Kargl from comment #8) > Yes, it should behave like -pedantic-errors. Actually no, -pedantic is equivalent to -Wpedantic, while -pedantic-errors = is -Werror=3Dpedantic. Rest is interpretation vs expectation. > -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. The -std=3Dlegacy already implies -fallow-argument-mismatch and wrongfully = warns by default. Consider gfortran -std=3Dlegacy -Wpedantic -Wno-error=3Dpedant= ic -c. > 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. Until every compiler vendor agree on universal module format for things like "USE MPI" or "USE MPI_F08", the HPC applications will continue to use F77 "mpif.h" include, unless "buffer" type would get standardized. Many projec= ts already split things like: call mpi_foo(1, MPI_INTEGER, N); ..... ; call mpi_foo(1., MPI_REAL, N) into separate compilable sources and in the end such compiler behavior change so= lved nothing other than creating lots unnecessary work for users and package maintainers for every different OS. It will become more evident when more = HPC systems get replaced from older LTS having older versions of gfortran.=