This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/48847] Wrong "unused parameter" warning with interface block


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]