From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 380923858414; Wed, 8 Sep 2021 14:14:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 380923858414 From: "ripero84 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: Wed, 08 Sep 2021 14:14:26 +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: ripero84 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: Wed, 08 Sep 2021 14:14:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102145 --- Comment #2 from ripero84 at gmail dot com --- 1) The gfortran manual has its own entries for -pedantic and -pedantic-erro= rs: -Wpedantic -pedantic Issue warnings for uses of extensions to Fortran. -pedantic also applies to C-language constructs where they occur in GNU Fortran source files, such as use of \e in a character constant within a directive like "#include". Valid Fortran programs should compile properly with or without this option. However, without this option, certain GNU extensions and traditional Fortran features are supported as well. With this option, many of them are rejected. Some users try to use -pedantic to check programs for conformance. They soon find that it does not do quite what they want---it finds some nonstandard practices, but not all. However, improvements to GNU Fortran in this area are welcome. This should be used in conjunction with -std=3Df95, -std=3Df2003, -std=3Df2008 or -std=3Df2018. -pedantic-errors Like -pedantic, except that errors are produced rather than warnings. The first lines of each description are quite clear about -pedantic issuing warnings and -pedantic-errors issuing errors instead of warnings, in what sounds like a very reasonable strategy. But then the second paragraph of -pedantic says that many (unspecified) non-standard features will be reject= ed. 2) This answers part of my issue: the behaviour is indeed documented, just = in a way that has proved confusing to me. It think that a more accurate descrip= tion would start with:=20 -pedantic: Issue warnings for some uses of extensions to Fortran, raise otherwise warnings to errors for others. Not all extensions will raise warnings or errors. which sounds bad. 3) If this is the intended behaviour I can propose some tweaks to the documentation, but as I said first I would like to have a confirmation (ide= ally by the person who set up the interaction between -pedantic and -fallow-argument-mismatch) that this is really intended behaviour, not accidental. 4) Apologies for not going into the C discussion, my C is limited, and to s= tart with I don't understand the "warnings demanded by strict ISO C" statement: ISO/IEC 9899:2017, Annex I (informative) "Common warnings" says that "An implementation may generate warnings in many situations, none of which are specified as part of this International Standard", so I don't really know w= hat the "demanded warnings" are. Thank you for your help.=