This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/43899] Wrong unused-variable warning with NAMELISTs
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Jun 2013 14:33:27 +0000
- Subject: [Bug fortran/43899] Wrong unused-variable warning with NAMELISTs
- Auto-submitted: auto-generated
- References: <bug-43899-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43899
--- Comment #16 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
(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.