This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [patch] [C/C++] Add a new warning flag -Wself-assign
> ...
> Besides minor changes that address the review comments, the
> major differences of this revised patch from the original one are (1)
> -Wself-assign is enabled by -Wall, and (2) -Winit-self flag is
> removed.
Given that self-assign is the documented way to suppress a warning (for
uninitialized variable) is it appropriate for -Wall to turn this on? It
would mean that code that was specifically fixed to avoid warnings under
-Wall will now get warnings again on that exact same line. I don't
object to the feature itself, but I do object to that aspect.
paul