diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-12 23:48:25 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-11-12 23:48:25 +0000 |
commit | 7653479025d0ad3f48dca9436167df5ce5b0e5b1 (patch) | |
tree | dc96649f06a0a81734786c3bb79e2278ae5cdfeb /gcc/cp | |
parent | 71b80ea2cb627706c4ef5784208f02a154d8a51f (diff) | |
download | gcc-7653479025d0ad3f48dca9436167df5ce5b0e5b1.tar.gz |
* tree.c (build_target_expr_with_type): Treate VA_ARG_EXPR like
CONSTRUCTOR.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73521 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/tree.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f74ac5e1491..0584924080d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2003-11-12 Mark Mitchell <mark@codesourcery.com> + * 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 63fdb948c7f..c14289d0d90 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); |