diff options
author | Jason Merrill <jason@redhat.com> | 2010-06-01 23:55:28 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-06-01 23:55:28 -0400 |
commit | e5901560633ce741df65202f21afbb4733af8753 (patch) | |
tree | 80ec8652e1e9d38d44bfc211a33ffa8782775701 /gcc/cp | |
parent | 591c890c9399b07959dd74f4225944a6052a4cce (diff) | |
download | gcc-e5901560633ce741df65202f21afbb4733af8753.zip gcc-e5901560633ce741df65202f21afbb4733af8753.tar.gz gcc-e5901560633ce741df65202f21afbb4733af8753.tar.bz2 |
re PR c++/44358 ([C++0x] initializer list can't convert to map)
PR c++/44358
* call.c (build_list_conv): Set list-initialization flags properly.
From-SVN: r160131
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/call.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5944313..1cb2baf 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-06-01 Jason Merrill <jason@redhat.com> + + PR c++/44358 + * call.c (build_list_conv): Set list-initialization flags properly. + 2010-06-01 Nathan Froyd <froydnj@codesourcery.com> * typeck2.c (build_x_arrow): Make types_memoized a VEC. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 64e2e50..4062702 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -589,6 +589,12 @@ build_list_conv (tree type, tree ctor, int flags) unsigned i; tree val; + /* Within a list-initialization we can have more user-defined + conversions. */ + flags &= ~LOOKUP_NO_CONVERSION; + /* But no narrowing conversions. */ + flags |= LOOKUP_NO_NARROWING; + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val) { conversion *sub |