aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cvt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-04-10 03:38:27 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-04-09 23:38:27 -0400
commitdc26f4715d78c198d25994b3f97e2219c9cfade5 (patch)
treeb5f953cac859b397058f9932dff3f71ebd03d28d /gcc/cp/cvt.c
parent34a4c46602286492977989248419f834ee9f6ffc (diff)
downloadgcc-dc26f4715d78c198d25994b3f97e2219c9cfade5.zip
gcc-dc26f4715d78c198d25994b3f97e2219c9cfade5.tar.gz
gcc-dc26f4715d78c198d25994b3f97e2219c9cfade5.tar.bz2
sig.c (build_signature_pointer_constructor): Don't set TREE_HAS_CONSTRUCTOR for a signature pointer.
* sig.c (build_signature_pointer_constructor): Don't set TREE_HAS_CONSTRUCTOR for a signature pointer. * cvt.c (ocp_convert): Don't force a temporary for internal structs. * init.c (resolve_offset_ref): Warn about implicit & on pmfs here, too. * typeck.c (build_unary_op): Only allow taking the address of a real constructor. * typeck2.c (digest_init): Simplify. (store_init_value): Don't pedwarn about using { } for pmfs. From-SVN: r19079
Diffstat (limited to 'gcc/cp/cvt.c')
-rw-r--r--gcc/cp/cvt.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c
index e4f802d..92dce8b 100644
--- a/gcc/cp/cvt.c
+++ b/gcc/cp/cvt.c
@@ -656,7 +656,11 @@ ocp_convert (type, expr, convtype, flags)
if (TREE_READONLY_DECL_P (e))
e = decl_constant_value (e);
- if (IS_AGGR_TYPE (type) && (convtype & CONV_FORCE_TEMP))
+ if (IS_AGGR_TYPE (type) && (convtype & CONV_FORCE_TEMP)
+ /* Some internal structures (vtable_entry_type, sigtbl_ptr_type)
+ don't go through finish_struct, so they don't have the synthesized
+ constructors. So don't force a temporary. */
+ && TYPE_HAS_CONSTRUCTOR (type))
/* We need a new temporary; don't take this shortcut. */;
else if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (TREE_TYPE (e)))
/* Trivial conversion: cv-qualifiers do not matter on rvalues. */