diff options
author | Jason Merrill <jason@redhat.com> | 2011-09-12 14:04:23 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-09-12 14:04:23 -0400 |
commit | 4ce1e77017b289c619d22c1bcbb120aae271098b (patch) | |
tree | a157be969f8997a7f7669a05d30a3a606b39c478 /gcc/cp | |
parent | b58d339116b877e735e57979143f4531d6a110d9 (diff) | |
download | gcc-4ce1e77017b289c619d22c1bcbb120aae271098b.zip gcc-4ce1e77017b289c619d22c1bcbb120aae271098b.tar.gz gcc-4ce1e77017b289c619d22c1bcbb120aae271098b.tar.bz2 |
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
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 9fbbbee..0d5ccde 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-09 Jason Merrill <jason@redhat.com> + + * call.c (implicit_conversion): Check BRACE_ENCLOSED_INITIALIZER_P + before forcing instantiation. + 2011-09-08 Paolo Carlini <paolo.carlini@oracle.com> PR c++/50324 diff --git a/gcc/cp/call.c b/gcc/cp/call.c index c707d66..62bee2d 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); |