]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
b166281b147a7884658a0fa0f29982e15678f9ac
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From af19d0c50df96adb55baaf54026ad82a9d256868 Mon Sep 17 00:00:00 2001
2 From: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
3 Date: Tue, 29 Mar 2011 14:26:00 +0000
4 Subject: [PATCH 031/200] * call.c (reference_binding): Allow direct binding to an array
5 rvalue.
6
7 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@171672 138bc75d-0d04-0410-961f-82ee72b054a4
8
9 index ac625a0..2ff3745 100644
10 --- a/gcc/cp/call.c
11 +++ b/gcc/cp/call.c
12 @@ -1429,7 +1429,9 @@ reference_binding (tree rto, tree rfrom, tree expr, bool c_cast_p, int flags)
13 || (((CP_TYPE_CONST_NON_VOLATILE_P (to)
14 && !(flags & LOOKUP_NO_TEMP_BIND))
15 || TYPE_REF_IS_RVALUE (rto))
16 - && (CLASS_TYPE_P (from) || (expr && lvalue_p (expr))))))
17 + && (CLASS_TYPE_P (from)
18 + || TREE_CODE (from) == ARRAY_TYPE
19 + || (expr && lvalue_p (expr))))))
20 {
21 /* [dcl.init.ref]
22
23 new file mode 100644
24 index 0000000..25113d7
25 --- /dev/null
26 +++ b/gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C
27 @@ -0,0 +1,5 @@
28 +// { dg-options -std=c++0x }
29 +
30 +typedef int IRT[2];
31 +
32 +const IRT& ir = IRT{1,2};
33 --
34 1.7.0.4
35