-Wunused-parameter
Tobias Schlüter
Tobias.Schlueter@physik.uni-muenchen.de
Wed Aug 1 12:20:00 GMT 2007
Daniel Franke wrote:
> Index: fortran/trans-decl.c
> ===================================================================
> --- fortran/trans-decl.c (revision 127062)
> +++ fortran/trans-decl.c (working copy)
> @@ -3031,7 +3031,7 @@ generate_local_decl (gfc_symbol * sym)
> }
> else if (sym->attr.flavor == FL_PARAMETER)
> {
> - if (warn_unused_variable
> + if (warn_unused_parameter
> && !sym->attr.referenced
> && !sym->attr.use_assoc)
> gfc_warning ("unused parameter '%s' declared at %L", sym->name,
^
While you're touching this area, can you change this to uppercase, as is
the convention elsewhere?
As far as the patch itself goes, does -Wunused-parameter affect warnings
for unused dummy arguments in Fortran code? In that case, your patch
may not be the right thing, otherwise I'm all in favor of applying it.
Thanks,
- Tobi
More information about the Fortran
mailing list