From: Mark Mitchell Date: Wed, 12 Nov 2003 23:48:25 +0000 (+0000) Subject: tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like CONSTRUCTOR. X-Git-Tag: releases/gcc-3.4.0~2354 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=662eceda1dd197b215822a8fa4d636350bf731bb;p=thirdparty%2Fgcc.git tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like CONSTRUCTOR. * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like CONSTRUCTOR. From-SVN: r73521 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f74ac5e14913..0584924080d0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2003-11-12 Mark Mitchell + * tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like + CONSTRUCTOR. + * decl.c (cp_make_fname_decl): When creating a top-level __FUNCTION__-like symbol, do register it with pushdecl. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 63fdb948c7f1..c14289d0d903 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -312,11 +312,13 @@ build_target_expr_with_type (tree init, tree type) return init; else if (CLASS_TYPE_P (type) && !TYPE_HAS_TRIVIAL_INIT_REF (type) && TREE_CODE (init) != COND_EXPR - && TREE_CODE (init) != CONSTRUCTOR) + && TREE_CODE (init) != CONSTRUCTOR + && TREE_CODE (init) != VA_ARG_EXPR) /* We need to build up a copy constructor call. COND_EXPR is a special case because we already have copies on the arms and we don't want another one here. A CONSTRUCTOR is aggregate initialization, which - is handled separately. */ + is handled separately. A VA_ARG_EXPR is magic creation of an + aggregate; there's no additional work to be done. */ return force_rvalue (init); slot = build_decl (VAR_DECL, NULL_TREE, type);