diff options
author | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-08 22:17:43 +0000 |
---|---|---|
committer | doko <doko@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-05-08 22:17:43 +0000 |
commit | 2e6c58c467c281dcfb979aa4baff4c561881f55e (patch) | |
tree | 8f874100e169b877a894892a7e313829194f9d46 | |
parent | e5284f78852783f967d1b1a33845c1e63342fece (diff) | |
download | gcc-2e6c58c467c281dcfb979aa4baff4c561881f55e.tar.gz |
gcc/
2014-05-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
Matthias Klose <doko@ubuntu.com>
PR driver/61106
* optc-gen.awk: Fix option handling for -Wunused-parameter.
gcc/testsuite/
2014-05-08 Matthias Klose <doko@ubuntu.com>
PR driver/61106
* gcc-dg/unused-8a.c: New.
* gcc-dg/unused-8b.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210246 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/optc-gen.awk | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/unused-8a.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/unused-8b.c | 4 |
5 files changed, 24 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 89a88e2b5ba..8e8b76e744d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-05-08 Manuel López-Ibáñez <manu@gcc.gnu.org> + Matthias Klose <doko@ubuntu.com> + + PR driver/61106 + * optc-gen.awk: Fix option handling for -Wunused-parameter. + 2014-05-08 Uros Bizjak <ubizjak@gmail.com> PR target/59952 diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index a091b72af4b..b70e4fe3aad 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -406,11 +406,13 @@ for (i = 0; i < n_enabledby; i++) { 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" diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bbfb333b90d..2dcf9dcfe14 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2014-05-08 Matthias Klose <doko@ubuntu.com> + + PR driver/61106 + * gcc-dg/unused-8a.c: New. + * gcc-dg/unused-8b.c: Likewise. + 2014-05-08 Marek Polacek <polacek@redhat.com> PR c/61053 diff --git a/gcc/testsuite/gcc.dg/unused-8a.c b/gcc/testsuite/gcc.dg/unused-8a.c new file mode 100644 index 00000000000..b9b56905156 --- /dev/null +++ b/gcc/testsuite/gcc.dg/unused-8a.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wextra -Wno-unused" } */ + +void foo(int x) { } diff --git a/gcc/testsuite/gcc.dg/unused-8b.c b/gcc/testsuite/gcc.dg/unused-8b.c new file mode 100644 index 00000000000..5b4b894937c --- /dev/null +++ b/gcc/testsuite/gcc.dg/unused-8b.c @@ -0,0 +1,4 @@ +/* { dg-do compile } */ +/* { dg-options "-Wall -Wno-unused -Wextra" } */ + +void foo(int x) { } |