aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2002-04-06 11:15:20 -0500
committerJason Merrill <jason@gcc.gnu.org>2002-04-06 11:15:20 -0500
commita29e103468238970130eeccec0bc239490a91300 (patch)
treeb6c3cda163f08bc0122fe499f1ac70867a11fc42 /gcc/cp/tree.c
parentf62ea15730209b4024837b30e9f0eb7e39fae3d9 (diff)
downloadgcc-a29e103468238970130eeccec0bc239490a91300.zip
gcc-a29e103468238970130eeccec0bc239490a91300.tar.gz
gcc-a29e103468238970130eeccec0bc239490a91300.tar.bz2
re PR c++/525 (Problem with Multiple Inheritance and -pedantic)
PR c++/525 * init.c (build_member_call): Use build_scoped_ref. (resolve_offset_ref): Likewise. * call.c (build_scoped_method_call): Likewise. * tree.c (maybe_dummy_object): Kludge around current_class_type being wrong. * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm. * cp-tree.h: Adjust. * init.c (push_base_cleanups): Just use build_scoped_method_call. From-SVN: r51956
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index e0f7361..641d82b 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -1844,7 +1844,11 @@ maybe_dummy_object (type, binfop)
if (binfop)
*binfop = binfo;
- if (current_class_ref && context == current_class_type)
+ if (current_class_ref && context == current_class_type
+ // Kludge: Make sure that current_class_type is actually correct.
+ // It might not be if we're in the middle of tsubst_default_argument.
+ && same_type_p (TYPE_MAIN_VARIANT (TREE_TYPE (current_class_ref)),
+ current_class_type))
decl = current_class_ref;
else
decl = build_dummy_object (context);