From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10602 invoked by alias); 20 Jun 2013 14:33:40 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 10535 invoked by uid 48); 20 Jun 2013 14:33:30 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/43899] Wrong unused-variable warning with NAMELISTs Date: Thu, 20 Jun 2013 14:33:00 -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: 4.5.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: REOPENED X-Bugzilla-Priority: P3 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg01105.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43899 --- Comment #16 from Dominique d'Humieres --- (In reply to Tobias Burnus from comment #15) > (In reply to Jerry DeLisle from comment #12) > > Remaining [...] is to warn on an unused namelist. I think this will involve > > marking namelists as used when resolving or translating I/O statements and > > then at some point, scan for any namelists not marked. > > I think the later scanning can be done when generating the DWARF debug > symbols (cf. PR37132) in trans-decl.c. While not very important, I find > such a warning useful. (One needs to be careful about those declared > in a module or accessed via host association. Fortunately, namelists > may not be declared in a BLOCK.) If there is a real need for a warning for unused namelist or namelist items, then a new PR should be open and this one closed. IMO it is just a waste of time: unused stuff having a strong tendency to produce false positive.