public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ripero84 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-102145-4-7AsQbhzumA@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-102145-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102145 --- Comment #2 from ripero84 at gmail dot com --- 1) The gfortran manual has its own entries for -pedantic and -pedantic-errors: -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=f95, -std=f2003, -std=f2008 or -std=f2018. -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 rejected. 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 description would start with: -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 (ideally 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 start 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 what the "demanded warnings" are. Thank you for your help.
next prev parent reply other threads:[~2021-09-08 14:14 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-08-31 14:59 [Bug fortran/102145] New: " ripero84 at gmail dot com 2021-08-31 17:24 ` [Bug fortran/102145] " kargl at gcc dot gnu.org 2021-09-08 14:14 ` ripero84 at gmail dot com [this message] 2021-09-08 16:51 ` sgk at troutmask dot apl.washington.edu 2021-09-12 19:08 ` rimvydas.jas at gmail dot com 2021-09-12 19:09 ` rimvydas.jas at gmail dot com 2021-09-12 19:22 ` kargl at gcc dot gnu.org 2021-09-12 19:34 ` rimvydas.jas at gmail dot com 2021-09-12 22:56 ` sgk at troutmask dot apl.washington.edu 2021-09-12 23:40 ` rimvydas.jas at gmail dot com 2021-09-13 2:52 ` sgk at troutmask dot apl.washington.edu 2021-09-13 5:18 ` rimvydas.jas at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-102145-4-7AsQbhzumA@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).