On 09/13/2012 09:28 AM, Paolo Carlini wrote:
Jon noticed that for this testcase we don't warn at all even with -Wall,
whereas the code doesn't really make much sense. Turns out that the
warning is currently controlled both by warn_init_self (not part of
-Wall) and OPT_Wuninitialized. Thus Manuel proposes to simply remove the
former, because this isn't the specific case of int x = x which we want
to keep on "supporting" as a GNU extension. Also, as mentioned by Jon,
the user can always leave 'i' out the mem-initializer-list.

Alternately, one may want to use OPT_Winit_self, but then we still have
the issue that -Winit-self is not part of -Wall.

I think my preference would be to add -Winit-self to -Wall for C++; people can use -Wno-init-self if they don't want the warning.

Jason

Reply via email to