[Bug fortran/61126] gfortran does not enable -Wununused-parameter with -Wextra
manu at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri May 9 22:18:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61126
--- Comment #13 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
This builds gfortran and fixes the testcase, but I haven't tested it beyond
that.
Index: lang.opt
===================================================================
--- lang.opt (revision 210292)
+++ lang.opt (working copy)
@@ -299,10 +299,14 @@ Warn if a user-procedure has the same na
Wunused-dummy-argument
Fortran Warning
Warn about unused dummy arguments.
+Wunused-parameter
+LangEnabledBy(Fortran,Wextra)
+; Documented in common.opt
+
Wzerotrip
Fortran Warning
Warn about zero-trip DO loops
cpp
Index: opts-global.c
===================================================================
--- opts-global.c (revision 210292)
+++ opts-global.c (working copy)
@@ -271,14 +271,14 @@ void
set_default_handlers (struct cl_option_handlers *handlers)
{
handlers->unknown_option_callback = unknown_option_callback;
handlers->wrong_lang_callback = complain_wrong_lang;
handlers->num_handlers = 3;
- handlers->handlers[0].handler = lang_handle_option;
- handlers->handlers[0].mask = initial_lang_mask;
- handlers->handlers[1].handler = common_handle_option;
- handlers->handlers[1].mask = CL_COMMON;
+ handlers->handlers[0].handler = common_handle_option;
+ handlers->handlers[0].mask = CL_COMMON;
+ handlers->handlers[1].handler = lang_handle_option;
+ handlers->handlers[1].mask = initial_lang_mask;
handlers->handlers[2].handler = target_handle_option;
handlers->handlers[2].mask = CL_TARGET;
}
/* Parse command line options and set default flag values. Do minimal
More information about the Gcc-bugs
mailing list