From: Jason Merrill Date: Mon, 12 Sep 2011 18:04:23 +0000 (-0400) Subject: call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P before forcing insta... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4ce1e77017b289c619d22c1bcbb120aae271098b;p=gcc.git call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P before forcing instantiation. * call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P before forcing instantiation. From-SVN: r178786 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9fbbbee9caf..0d5ccde887a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-09 Jason Merrill + + * call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P + before forcing instantiation. + 2011-09-08 Paolo Carlini PR c++/50324 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c707d663e24..62bee2da480 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1848,8 +1848,8 @@ implicit_conversion (tree to, tree from, tree expr, bool c_cast_p, |LOOKUP_NO_NARROWING)); if (CLASS_TYPE_P (to) - && !CLASSTYPE_NON_AGGREGATE (complete_type (to)) - && BRACE_ENCLOSED_INITIALIZER_P (expr)) + && BRACE_ENCLOSED_INITIALIZER_P (expr) + && !CLASSTYPE_NON_AGGREGATE (complete_type (to))) return build_aggr_conv (to, expr, flags); cand = build_user_type_conversion_1 (to, expr, convflags);