aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-08-27 04:58:19 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-08-27 04:58:19 +0000
commite1376b008f646728e2639f795a8af63ac28c2480 (patch)
tree87aeb110ffe300a105006b507f18cd0169cee5b0 /gcc/cp/expr.c
parent078a76c8a059f7a0ff4db84234279e1b0e3ef770 (diff)
downloadgcc-e1376b008f646728e2639f795a8af63ac28c2480.zip
gcc-e1376b008f646728e2639f795a8af63ac28c2480.tar.gz
gcc-e1376b008f646728e2639f795a8af63ac28c2480.tar.bz2
cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
* cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro. * tree.c (build_cplus_new): Set it. * expr.c (cplus_expand_expr): Use it. From-SVN: r28915
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index e85e088..373afe6 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -154,9 +154,7 @@ cplus_expand_expr (exp, target, tmode, modifier)
initialization. It is left here to show the choices that
exist for C++. */
- if (TREE_CODE (func) == ADDR_EXPR
- && TREE_CODE (TREE_OPERAND (func, 0)) == FUNCTION_DECL
- && DECL_CONSTRUCTOR_P (TREE_OPERAND (func, 0)))
+ if (AGGR_INIT_VIA_CTOR_P (exp))
{
type = build_pointer_type (type);
/* Don't clobber a value that might be part of a default