diff options
author | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-04-19 11:04:13 +0000 |
---|---|---|
committer | Manuel López-Ibáñez <manu@gcc.gnu.org> | 2009-04-19 11:04:13 +0000 |
commit | ca409efd9282623758e9b8f36df75cdd7278a3e1 (patch) | |
tree | bcaf465ab5ba49fd67b08ce44d9d4349c54cc20e /gcc/c-opts.c | |
parent | c93c8cf442616849535c5ec3a50d517ad76fe5d3 (diff) | |
download | gcc-ca409efd9282623758e9b8f36df75cdd7278a3e1.tar.gz |
re PR c/32061 ((Wlogical-op) wording of warning of constant logicials need improvement)
2009-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
PR c/32061
PR c++/36954
* doc/invoke.texi: Add -Wlogical-op to -Wextra.
* common.opt (Wlogical-op): Move from here...
* c.opt (Wlogical-op): ... to here.
* c-typeck.c (parser_build_binary_op): Update call to
warn_logical_operator.
* c-opts.c (c_common_post_options): Enable warn_logical_op with
extra_warnings.
* c-common.c (warn_logical_op): Update.
* c-common.h (warn_logical_op): Update declaration.
cp/
* call.c (build_new_op): Save the original codes of operands
before folding.
testsuite/
* gcc.dg/pr32061.c: New.
* gcc.dg/Wlogical-op-1.c: Update.
* g++.dg/warn/Wlogical-op-1.C: Update.
* g++.dg/warn/pr36954.C: New.
From-SVN: r146344
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r-- | gcc/c-opts.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c index f61952289c8..ece4d7f8a4a 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1080,6 +1080,8 @@ c_common_post_options (const char **pfilename) warn_override_init = extra_warnings; if (warn_ignored_qualifiers == -1) warn_ignored_qualifiers = extra_warnings; + if (warn_logical_op == -1) + warn_logical_op = extra_warnings; /* -Wpointer-sign is disabled by default, but it is enabled if any of -Wall or -pedantic are given. */ |