This fixes a regression introduced with 4.8, where the option ordering of -Wextra and -Wunused-parameter emits a warning, which is not emitted with 4.7. No regressions with the trunk, the 4.9 and 4.8 branches. Ok to check in for these?
Matthias 2014-05-08 Manuel L<C3><B3>pez-Ib<C3><A1><C3><B1>ez <m...@gcc.gnu.org> Matthias Klose <d...@ubuntu.com> PR driver/61106 * optc-gen.awk: Fix option handling for -Wunused-parameter. gcc/testsuite/ 2014-05-08 Matthias Klose <d...@ubuntu.com> PR driver/61106 * gcc-dg/unused-8a.c: New. * gcc-dg/unused-8b.c: Likewise.
gcc/ 2014-05-08 Manuel López-Ibáñez <m...@gcc.gnu.org> Matthias Klose <d...@ubuntu.com> PR driver/61106 * optc-gen.awk: Fix option handling for -Wunused-parameter. gcc/testsuite/ 2014-05-08 Matthias Klose <d...@ubuntu.com> PR driver/61106 * gcc-dg/unused-8a.c: New. * gcc-dg/unused-8b.c: Likewise. Index: gcc/optc-gen.awk =================================================================== --- gcc/optc-gen.awk (revision 210245) +++ gcc/optc-gen.awk (working copy) @@ -406,11 +406,13 @@ if (opt_var_name != "") { condition = "!opts_set->x_" opt_var_name if (thisenableif[j] != "") { - condition = condition " && (" thisenableif[j] ")" + value = "(" thisenableif[j] ")" + } else { + value = "value" } print " if (" condition ")" print " handle_generated_option (opts, opts_set," - print " " opt_enum(thisenable[j]) ", NULL, value," + print " " opt_enum(thisenable[j]) ", NULL, " value "," print " lang_mask, kind, loc, handlers, dc);" } else { print "#error " thisenable[j] " does not have a Var() flag" Index: gcc/testsuite/gcc.dg/unused-8a.c =================================================================== --- gcc/testsuite/gcc.dg/unused-8a.c (revision 0) +++ gcc/testsuite/gcc.dg/unused-8a.c (working copy) @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wextra -Wno-unused" } */ + +void foo(int x) { } Index: gcc/testsuite/gcc.dg/unused-8b.c =================================================================== --- gcc/testsuite/gcc.dg/unused-8b.c (revision 0) +++ gcc/testsuite/gcc.dg/unused-8b.c (working copy) @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wno-unused -Wextra" } */ + +void foo(int x) { }