Commit d9dd2c4e by Mark Mitchell Committed by Mark Mitchell

re PR c++/11554 (Warning about reordering of initializers doesn't mention location of constructor)

	PR c++/11554
	* init.c (sort_mem_initializers): Add warning.

	PR c++/11554
	* testsuite/g++.dg/warn/ctor-init-1.C: New test.

From-SVN: r74926
parent c6a515f4
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.
......
......@@ -514,6 +514,7 @@ sort_mem_initializers (tree t, tree mem_inits)
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
......
// PR c++/11554
// { dg-options "-Wall" }
struct Y {
Y ();
int i1, i2; // { dg-warning "" }
};
Y::Y () : i2(0), i1(0) {} // { dg-warning "" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment