[patch] [C/C++] Add a new warning flag -Wself-assign
Manuel López-Ibáñez
lopezibanez@gmail.com
Wed Jun 30 00:41:00 GMT 2010
--- 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 ())
{
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.
Manuel.
More information about the Gcc-patches
mailing list