aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1999-05-20 12:21:53 +0000
committerJason Merrill <jason@gcc.gnu.org>1999-05-20 08:21:53 -0400
commit6d813d4d850ce5b22d74f3479822dfe91c0fe35f (patch)
tree7359b8ac7c2e149be051eb0b97f9c2510de36011
parent75153fba81d4bb413428631ff087e430a604a667 (diff)
downloadgcc-6d813d4d850ce5b22d74f3479822dfe91c0fe35f.zip
gcc-6d813d4d850ce5b22d74f3479822dfe91c0fe35f.tar.gz
gcc-6d813d4d850ce5b22d74f3479822dfe91c0fe35f.tar.bz2
class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
* class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P. * class.c (finish_base_struct): Allow non-COM bases for COM classes except at the leftmost position. (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable): Pass the binfo's class, not the most derived, to skip_rtti_stuff. * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise. From-SVN: r27065
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/class.c12
-rw-r--r--gcc/cp/search.c4
3 files changed, 16 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 801aeea..5ac9e81 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,13 @@
1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
+ * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
+
+ * class.c (finish_base_struct): Allow non-COM bases for COM classes
+ except at the leftmost position.
+ (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
+ Pass the binfo's class, not the most derived, to skip_rtti_stuff.
+ * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
+
* tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
(build_cplus_new): Make sure that what we return is of the right type.
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index 94c891e..fe56078 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1649,7 +1649,7 @@ finish_base_struct (t, b)
("COM interface type `%T' must be the leftmost base class",
basetype);
}
- else if (CLASSTYPE_COM_INTERFACE (t))
+ else if (CLASSTYPE_COM_INTERFACE (t) && i == 0)
{
cp_error ("COM interface type `%T' with non-COM base class `%T'",
t, basetype);
@@ -2356,7 +2356,7 @@ modify_one_vtable (binfo, t, fndecl, pfn)
if (fndecl == NULL_TREE)
return;
- n = skip_rtti_stuff (&virtuals, t);
+ n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
while (virtuals)
{
@@ -2450,7 +2450,7 @@ fixup_vtable_deltas1 (binfo, t)
tree virtuals = BINFO_VIRTUALS (binfo);
unsigned HOST_WIDE_INT n;
- n = skip_rtti_stuff (&virtuals, t);
+ n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
while (virtuals)
{
@@ -2623,8 +2623,8 @@ override_one_vtable (binfo, old, t)
if (BINFO_NEW_VTABLE_MARKED (binfo))
choose = NEITHER;
- skip_rtti_stuff (&virtuals, t);
- skip_rtti_stuff (&old_virtuals, t);
+ skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
+ skip_rtti_stuff (&old_virtuals, BINFO_TYPE (binfo));
while (virtuals)
{
@@ -3523,7 +3523,7 @@ finish_struct_1 (t, warn_anon)
while (TREE_CODE (type) == ARRAY_TYPE)
type = TREE_TYPE (type);
- if (CLASS_TYPE_P (type))
+ if (CLASS_TYPE_P (type) && ! ANON_AGGR_TYPE_P (type))
{
/* Never let anything with uninheritable virtuals
make it through without complaint. */
diff --git a/gcc/cp/search.c b/gcc/cp/search.c
index 906aa13..63b733d 100644
--- a/gcc/cp/search.c
+++ b/gcc/cp/search.c
@@ -2013,7 +2013,7 @@ get_abstract_virtuals (type)
{
tree virtuals = BINFO_VIRTUALS (vbases);
- skip_rtti_stuff (&virtuals, type);
+ skip_rtti_stuff (&virtuals, BINFO_TYPE (vbases));
while (virtuals)
{
@@ -2476,7 +2476,7 @@ expand_upcast_fixups (binfo, addr, orig_addr, vbase, vbase_addr, t,
*vbase_offsets = delta;
}
- n = skip_rtti_stuff (&virtuals, t);
+ n = skip_rtti_stuff (&virtuals, BINFO_TYPE (binfo));
while (virtuals)
{