aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-11-14 20:53:37 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-11-14 20:53:37 -0500
commitd3061adb7fc27794f434d688e72669f45097ae82 (patch)
treeed887803eac4ff793a67dab2e4942a835b9efc88 /gcc/cp
parent4fce678f8afd3d667becf67576b7d88d07670805 (diff)
downloadgcc-d3061adb7fc27794f434d688e72669f45097ae82.zip
gcc-d3061adb7fc27794f434d688e72669f45097ae82.tar.gz
gcc-d3061adb7fc27794f434d688e72669f45097ae82.tar.bz2
class.c (finish_struct_1): Check virtual functions for missing ABI tags.
* class.c (finish_struct_1): Check virtual functions for missing ABI tags. From-SVN: r193525
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/class.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bb5e4ba..af55e29 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,8 @@
2012-11-13 Jason Merrill <jason@redhat.com>
+ * class.c (finish_struct_1): Check virtual functions
+ for missing ABI tags.
+
PR c++/55275
* pt.c (maybe_process_partial_specialization): Update
DECL_SOURCE_LOCATION for new specializations.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 0665e90..cdc02ae 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -6275,6 +6275,12 @@ finish_struct_1 (tree t)
/* Here we know enough to change the type of our virtual
function table, but we will wait until later this function. */
build_primary_vtable (CLASSTYPE_PRIMARY_BINFO (t), t);
+
+ /* If we're warning about ABI tags, check the types of the new
+ virtual functions. */
+ if (warn_abi_tag)
+ for (tree v = virtuals; v; v = TREE_CHAIN (v))
+ check_abi_tags (t, TREE_VALUE (v));
}
if (TYPE_CONTAINS_VPTR_P (t))