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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org

--- Comment #12 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #10)
> 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.

On the other hand, if you want to have a different behavior, then in the ideal
case this should work:


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


Unfortunately, the handlers for the options are set up such that the language
specific handlers are executed before the common_handler (which is executed
before the target-specific handler). 

Joseph, why is that so? I think it makes sense that the FEs can override the
common settings, like the targets can.

The alternative is to duplicate the option in every FE and remove it from
common.opt. That seems quite ugly to me.

Reply via email to