diff options
author | Jason Merrill <jason@redhat.com> | 2002-09-01 03:46:38 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2002-09-01 03:46:38 -0400 |
commit | d99f015cc5daf02fe8949375026721cb5760f06a (patch) | |
tree | 5c0d0910aad95f6cf29f373f24156cc73a7b6e69 /gcc/cp/cp-lang.c | |
parent | ad5aa77eec9d1fa562b7f16a139ec9564ec7e330 (diff) | |
download | gcc-d99f015cc5daf02fe8949375026721cb5760f06a.zip gcc-d99f015cc5daf02fe8949375026721cb5760f06a.tar.gz gcc-d99f015cc5daf02fe8949375026721cb5760f06a.tar.bz2 |
cp-lang.c (cp_expr_size): Allow initialization from a CONSTRUCTOR.
* cp-lang.c (cp_expr_size): Allow initialization from a
CONSTRUCTOR.
From-SVN: r56720
Diffstat (limited to 'gcc/cp/cp-lang.c')
-rw-r--r-- | gcc/cp/cp-lang.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/cp-lang.c b/gcc/cp/cp-lang.c index f2689b5..3f771a9 100644 --- a/gcc/cp/cp-lang.c +++ b/gcc/cp/cp-lang.c @@ -298,7 +298,9 @@ cp_expr_size (exp) of a type with both of these set; all copies of such types must go through a constructor or assignment op. */ if (TYPE_HAS_COMPLEX_INIT_REF (TREE_TYPE (exp)) - && TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp))) + && TYPE_HAS_COMPLEX_ASSIGN_REF (TREE_TYPE (exp)) + /* But storing a CONSTRUCTOR isn't a copy. */ + && TREE_CODE (exp) != CONSTRUCTOR) abort (); /* This would be wrong for a type with virtual bases, but they are caught by the abort above. */ |