* init.c (sort_mem_initializers): Add warning.
PR c++/11554
* testsuite/g++.dg/warn/ctor-init-1.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74926
138bc75d-0d04-0410-961f-
82ee72b054a4
+2003-12-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/11554
+ * init.c (sort_mem_initializers): Add warning.
+
2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
* call.c: Fix comment formatting.
cp_warning_at (" `%#D'", subobject);
else
warning (" base `%T'", subobject);
+ warning (" when initialized here");
}
/* Look again, from the beginning of the list. */
+2003-12-21 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/11554
+ * testsuite/g++.dg/warn/ctor-init-1.C: New test.
+
2003-12-21 Kazu Hirata <kazu@cs.umass.edu>
* gcc.c-torture/compile/20020910-1.c: Disable if __INT_MAX is
--- /dev/null
+// PR c++/11554
+// { dg-options "-Wall" }
+
+struct Y {
+ Y ();
+ int i1, i2; // { dg-warning "" }
+};
+
+Y::Y () : i2(0), i1(0) {} // { dg-warning "" }