This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/61126] [4.10 Regression] gfortran does not enable -Wununused-parameter with -Wextra
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 15 May 2014 10:44:05 +0000
- Subject: [Bug fortran/61126] [4.10 Regression] gfortran does not enable -Wununused-parameter with -Wextra
- Auto-submitted: auto-generated
- References: <bug-61126-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61126
--- Comment #22 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #21)
> -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.
>
> This should probably be changed if -Wunused-parameter is implied by -Wextra.
What is that gfortran wants?
1. -Wunused-parameter is enabled just by -Wextra. This needs the patches above
plus update the manual. This means that -Wextra -Wno-unused, will keep giving
-Wunused-parameter warnings.
2. Follow all the other FEs, that is, -Wunused-parameter is enabled by the
combination of -Wunused and -Wextra. This needs just the patch in comment #10
plus change -Wall to -Wunused in the manual (the current text is correct, but
the actual reason is that -Wall implies -Wunused, so -Wall -Wextra => -Wunused
-Wextra => -Wunused-parameter).