aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/typeck2.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 39a5eb8..c84de88 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/39056
+ * typeck2.c (digest_init_r): Don't call process_init_constructor
+ for COMPLEX_TYPE.
+
2009-02-03 Paolo Bonzini <bonzini@gnu.org>
PR c++/36897
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index a19a999..526f780 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -789,7 +789,8 @@ digest_init_r (tree type, tree init, bool nested)
}
/* Handle scalar types (including conversions) and references. */
- if (TREE_CODE (type) != COMPLEX_TYPE
+ if ((TREE_CODE (type) != COMPLEX_TYPE
+ || BRACE_ENCLOSED_INITIALIZER_P (init))
&& (SCALAR_TYPE_P (type) || code == REFERENCE_TYPE))
{
tree *exp;