Commit a3b20e90 by Jason Merrill Committed by Jason Merrill

re PR c++/42837 (FAIL: g++.dg/abi/packed1.C execution test)

	PR c++/42837
	* stor-layout.c (place_field): Don't warn about unnecessary DECL_PACKED
	if the type is packed.

From-SVN: r157013
parent 5ead99fa
2010-02-23 Jason Merrill <jason@redhat.com>
PR c++/42837
* stor-layout.c (place_field): Don't warn about unnecessary
DECL_PACKED if the type is packed.
2010-02-23 Jakub Jelinek <jakub@redhat.com>
PR target/43139
......
......@@ -1100,7 +1100,8 @@ place_field (record_layout_info rli, tree field)
if (STRICT_ALIGNMENT)
warning (OPT_Wattributes, "packed attribute causes "
"inefficient alignment for %q+D", field);
else
/* Don't warn if DECL_PACKED was set by the type. */
else if (!TYPE_PACKED (rli->t))
warning (OPT_Wattributes, "packed attribute is "
"unnecessary for %q+D", field);
}
......
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