+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c++/53210
+ * doc/invoke.texi ([Winit-self]): Document as enabled by -Wall
+ in C++.
+
2012-09-13 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/predicates.md (input_operand): Do not consider TImode
+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c++/53210
+ * c.opt ([Winit-self]): Enabled by -Wall in C++.
+
2012-08-23 Arnaud Charlet <charlet@adacore.com>
* c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
Warn whenever type qualifiers are ignored.
Winit-self
-C ObjC C++ ObjC++ Var(warn_init_self) Warning
+C ObjC C++ ObjC++ Var(warn_init_self) Warning LangEnabledBy(C++ ObjC++,Wall)
Warn about variables which are initialized to themselves
Wimplicit
+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c++/53210
+ * init.c (perform_member_init): Use OPT_Winit_self instead of
+ OPT_Wuninitialized.
+
2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
* typeck.c (build_indirect_ref, build_function_call,
if (TREE_CODE (val) == COMPONENT_REF && TREE_OPERAND (val, 1) == member
&& TREE_OPERAND (val, 0) == current_class_ref)
warning_at (DECL_SOURCE_LOCATION (current_function_decl),
- OPT_Wuninitialized, "%qD is initialized with itself",
+ OPT_Winit_self, "%qD is initialized with itself",
member);
}
@end group
@end smallexample
+This warning is enabled by @option{-Wall} in C++.
+
@item -Wimplicit-int @r{(C and Objective-C only)}
@opindex Wimplicit-int
@opindex Wno-implicit-int
+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c++/53210
+ * g++.dg/warn/Wuninitialized-self.C: New.
+
2012-09-13 Jakub Jelinek <jakub@redhat.com>
PR c/54559
--- /dev/null
+// PR c++/53210
+// { dg-options "-Wall" }
+
+struct S
+{
+ S(int i) : j(j) { } // { dg-warning "is initialized with itself" }
+ int j;
+};