This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/48847] Wrong "unused parameter" warning with interface block
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 03 Feb 2012 22:13:07 +0000
- Subject: [Bug fortran/48847] Wrong "unused parameter" warning with interface block
- Auto-submitted: auto-generated
- References: <bug-48847-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48847
--- Comment #2 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2012-02-03 22:13:07 UTC ---
This doesn't match the docs. We say
-Wunused-parameter'
Contrary to `gcc''s meaning of `-Wunused-parameter', `gfortran''s
implementation of this option does not warn about unused dummy
arguments (see `-Wunused-dummy-argument'), but about unused
`PARAMETER' values. `-Wunused-parameter' is not included in
`-Wall' but is implied by `-Wall -Wextra'.
-Wunsued-parameter is being used in the C sense here.
We don't warn with
ig25@linux-fd1f:~/Krempel/Unused> cat bar.f90
module foo
contains
function f(g)
f = g()
end function f
end module foo
ig25@linux-fd1f:~/Krempel/Unused> gfortran -S -Wunused-dummy-argument bar.f90
(and we should).