public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/31129] No warning on unused parameters Date: Mon, 09 Jul 2007 10:18:00 -0000 [thread overview] Message-ID: <20070709101826.19845.qmail@sourceware.org> (raw) In-Reply-To: <bug-31129-14178@http.gcc.gnu.org/bugzilla/> ------- Comment #1 from dfranke at gcc dot gnu dot org 2007-07-09 10:18 ------- Emit a warning if an unused parameter is found (-Wunused/-Wall), currently regtesting: Index: trans-decl.c =================================================================== --- trans-decl.c (revision 126478) +++ trans-decl.c (working copy) @@ -3035,6 +3035,12 @@ if (sym->attr.dummy && sym->backend_decl != NULL_TREE) TREE_NO_WARNING(sym->backend_decl) = 1; } + else if (sym->attr.flavor == FL_PARAMETER) + { + if (warn_unused_variable && !sym->attr.referenced) + gfc_warning ("unused parameter '%s' declared at %L", sym->name, + &sym->declared_at); + } if (sym->attr.dummy == 1) { -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org AssignedTo|unassigned at gcc dot gnu |dfranke at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2007-03-17 11:40:46 |2007-07-09 10:18:26 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31129
next prev parent reply other threads:[~2007-07-09 10:18 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-03-11 1:55 [Bug fortran/31129] New: " terry at chem dot gu dot se 2007-03-17 11:40 ` [Bug fortran/31129] " fxcoudert at gcc dot gnu dot org 2007-07-09 10:18 ` dfranke at gcc dot gnu dot org [this message] 2007-07-09 12:10 ` patchapp at dberlin dot org 2007-07-09 14:57 ` dfranke at gcc dot gnu dot org 2007-07-09 14:59 ` dfranke at gcc dot gnu dot org 2007-07-09 15:01 ` dfranke at gcc dot gnu dot org
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=20070709101826.19845.qmail@sourceware.org \ --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).