PR c++/21210
* typeck2.c (build_functional_cast): Use cp_convert to construct
non-aggregate initializers instead of the user-level build_c_cast.
* g++.dg/init/complex1.C: New test case.
From-SVN: r114634
+2006-06-13 Roger Sayle <roger@eyesopen.com>
+
+ PR c++/21210
+ * typeck2.c (build_functional_cast): Use cp_convert to construct
+ non-aggregate initializers instead of the user-level build_c_cast.
+
2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27601
if (! IS_AGGR_TYPE (type))
{
- /* This must build a C cast. */
if (parms == NULL_TREE)
- parms = integer_zero_node;
- else
- parms = build_x_compound_expr_from_list (parms, "functional cast");
+ return cp_convert (type, integer_zero_node);
+ /* This must build a C cast. */
+ parms = build_x_compound_expr_from_list (parms, "functional cast");
return build_c_cast (type, parms);
}
+2006-06-13 Roger Sayle <roger@eyesopen.com>
+
+ PR c++/21210
+ * g++.dg/init/complex1.C: New test case.
+
2006-06-12 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27601
--- /dev/null
+/* PR c++/21210 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef float __complex__ fcomplex;
+fcomplex cplx = fcomplex();
+