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
This commit is contained in:
Jason Merrill 2010-02-24 14:26:29 -05:00 committed by Jason Merrill
parent 22faf0048f
commit 254d1a5a0c
3 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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)))

View File

@ -1,4 +1,4 @@
// { dg-options "-Wabi" }
// { dg-options "-Wabi -fabi-version=1" }
struct A {};