[C/C++] Add a new warning flag -Wself-assign
diff mbox

Message ID AANLkTindw-52LTcteCh6Ymlr5U5DQP-EpnlyWaEdqrDY@mail.gmail.com
State New
Headers show

Commit Message

Manuel López-Ibáñez June 29, 2010, 7:51 p.m. UTC
Please, use the new handle_option as it is done for Wimplicit just a
few lines above. Otherwise, Werror= and pragma diagnostic won't work
correctly. I know that the majority of options are not enabled this
way. They should, but no one has bothered to finish this transition.

>        * dbxout.c (DEBUGGER_ARG_OFFSET):
>        * omega.c (omega_eliminate_redundant)
>        * tree-ssa-ccp.c (ccp_lattice_meet)
>        * cgraphunit.c (cgraph_copy_node_for_versioning)
>        * config/i386/i386.c (ix86_vectorize_builtin_vec_perm)

Please, sent these fixes separately. They are independent from your
patch and make your patch more difficult to review. The smaller a
patch the quickest to review. You may think that CCing more
maintainers will get your patch reviewed quicker, but the opposite is
often true.


diff mbox

--- gcc/c-family/c-opts.c	(revision 161236)
+++ gcc/c-family/c-opts.c	(working copy)
@@ -486,6 +486,7 @@  c_common_handle_option (size_t scode, co
       warn_unknown_pragmas = value;

       warn_uninitialized = value;
+      warn_self_assign = value;

       if (!c_dialect_cxx ())