This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
- 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: Wed, 24 Jun 2015 19:00:35 +0000
- Subject: [Bug fortran/66605] -Wunused-parameter causes internal compiler error with gfortran 5.1.0
- Auto-submitted: auto-generated
- References: <bug-66605-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66605
--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> BTW, is the resulting warning actually correct?
According the gfortran manual
-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 implied by -Wextra if also -Wunused or -Wall is used.
If I understand correctly the above statement, -Wunused-parameter should not
emit a warning for the test in comment 0: there is no parameter. The warning
should be issued with -Wunused-dummy-argument
pr66605.f90:5:25:
SUBROUTINE sub (neq, time, y, dydt)
1
Warning: Unused dummy argument 'time' at (1) [-Wunused-dummy-argument]