mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 14:41:07 +08:00
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:
parent
22faf0048f
commit
254d1a5a0c
@ -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
|
||||
|
@ -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)))
|
||||
|
@ -1,4 +1,4 @@
|
||||
// { dg-options "-Wabi" }
|
||||
// { dg-options "-Wabi -fabi-version=1" }
|
||||
|
||||
struct A {};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user