Commit 254d1a5a by Jason Merrill Committed by Jason Merrill

class.c (layout_class_type): Don't give -Wabi warning for a bug in a previous ABI version.

	* class.c (layout_class_type): Don't give -Wabi warning for a bug
	in a previous ABI version.

From-SVN: r157051
parent 22faf004
2010-02-24 Jason Merrill <jason@redhat.com>
* class.c (layout_class_type): Don't give -Wabi warning for a bug
in a previous ABI version.
2010-02-23 Jason Merrill <jason@redhat.com>
PR c++/43143
......
......@@ -5044,6 +5044,7 @@ layout_class_type (tree t, tree *virtuals_p)
/* G++ used to use DECL_FIELD_OFFSET as if it were the byte
offset of the field. */
if (warn_abi
&& !abi_version_at_least (2)
&& !tree_int_cst_equal (DECL_FIELD_OFFSET (field),
byte_position (field))
&& contains_empty_class_p (TREE_TYPE (field)))
......
// { dg-options "-Wabi" }
// { dg-options "-Wabi -fabi-version=1" }
struct A {};
......
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