http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61126

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #7)
> (In reply to Florian Weimer from comment #0)
> > The gfortran.dg/wextra_1.f test case assumes that -Wextra enables
> > -Wununused-parameter, but this does not happen.  No warning is printed on
> > line 4, leading to a test failure.
> 
> I don't understand how it was working before. What is exactly the
> command-line passed to that testcase?

I think in Fortran, -Wextra just generates -Wunused-parameter because of this:

Index: options.c
===================================================================
--- options.c   (revision 209347)
+++ options.c   (working copy)
@@ -672,16 +672,11 @@ gfc_handle_option (size_t scode, const c
     case OPT_Wconversion_extra:
       gfc_option.warn_conversion_extra = value;
       break;

     case OPT_Wextra:
-      handle_generated_option (&global_options, &global_options_set,
-                              OPT_Wunused_parameter, NULL, value,
-                              gfc_option_lang_mask (), kind, loc,
-                              handlers, global_dc);
       set_Wextra (value);
-
       break;

     case OPT_Wfunction_elimination:
       gfc_option.warn_function_elimination = value;
       break;

If you want to have the same behavior in Fortran as in the rest of GCC, then
delete the above. The above was enabling -Wunused-parameter just with -Wextra
(only in Fortran), and because of the existing bug fixed by r210246, this was
never overriden by the general machinery.

Reply via email to