[Bug fortran/52789] gfortran sets -Wunused-parameter in the C sense as well as the Fortran sense
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Apr 2 09:38:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52789
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-04-02
CC| |burnus at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-04-02 09:38:34 UTC ---
Confirmed.
* * *
We have for GCC in general:
Language Independent Options
Warning Options
-Wunused-parameter
Warn whenever a function parameter is unused aside from its declaration.
(It is automatically enabled with -Wunused or -Wall.)
And gfortran specific:
-Wunused-dummy-argument
Warn about unused dummy arguments. This option is implied by -Wall.
-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.
* * *
TODO:
* "-Wunused" does not imply any of the Fortran -Wunused-* warnings.
But it should! Interestingly, is does not even seem to enable the middle end
warnings.
* If only -Wunused-parameter is used - but no flag which implies
-Wunused-dummy-argument, the parameter has to be eliminated for the
middle-end handling. Thus, we need a gfc_option.* for it - and ensure
that warn_unused_parameter has the proper value (e.g. 0 if only
-Wunused-parameter is used.)
More information about the Gcc-bugs
mailing list