Commit f0b99d6c by Roger Sayle Committed by Roger Sayle

re PR c++/21210 (Trouble with __complex__ types default construction)


	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: r114573
parent 586825f1
2006-06-12 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-07 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27601
......
......@@ -1299,12 +1299,11 @@ build_functional_cast (tree exp, tree parms)
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-12 Roger Sayle <roger@eyesopen.com>
PR c++/21210
* g++.dg/init/complex1.C: New test case.
2006-06-11 Eric Christopher <echristo@apple.com>
PR middle-end/27948
/* PR c++/21210 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
typedef float __complex__ fcomplex;
fcomplex cplx = fcomplex();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment