This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] [C/C++] Add a new warning flag -Wself-assign


--- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]