]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
class.c (layout_class_type): Don't give -Wabi warning for a bug in a previous ABI...
authorJason Merrill <jason@redhat.com>
Wed, 24 Feb 2010 19:26:29 +0000 (14:26 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 24 Feb 2010 19:26:29 +0000 (14:26 -0500)
* class.c (layout_class_type): Don't give -Wabi warning for a bug
in a previous ABI version.

From-SVN: r157051

gcc/cp/ChangeLog
gcc/cp/class.c
gcc/testsuite/g++.dg/abi/empty6.C

index c72e7e3dc6b47d97ae6d4dd584d85a7648eaf7fd..427b3ad47deafebcbecd5530f4d5efa07df65661 100644 (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
index f7e0a9307d5d471ecd98f2f4ec43d699a6401eda..1bab07dd42c652552b25202d5eef7cc6f2500e9c 100644 (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)))
index f78630878234a06f35ec5265281ba8b192ec6bee..1b14a6d03bec1fc2a9d2beffc3a9783e9e81ba12 100644 (file)
@@ -1,4 +1,4 @@
-// { dg-options "-Wabi" }
+// { dg-options "-Wabi -fabi-version=1" }
 
 struct A {};