diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-14 05:25:13 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-07-14 05:25:13 +0000 |
commit | 3e24efbcd9e43e23f3fbc87d94e3e6762a39282a (patch) | |
tree | e863df7243b1ccfc3192b2e7d92b3c62823b79ab /gcc/cp/call.c | |
parent | 15eea0fcd8a4cf1534f1356fec6a57afc5275746 (diff) | |
download | gcc-3e24efbcd9e43e23f3fbc87d94e3e6762a39282a.tar.gz |
PR c++/58636
* call.c (build_list_conv): Don't try to build a list of references.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212503 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r-- | gcc/cp/call.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 4ca6be5bd00..b16c6e42167 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -806,6 +806,12 @@ build_list_conv (tree type, tree ctor, int flags, tsubst_flags_t complain) /* But no narrowing conversions. */ flags |= LOOKUP_NO_NARROWING; + /* Can't make an array of these types. */ + if (TREE_CODE (elttype) == REFERENCE_TYPE + || TREE_CODE (elttype) == FUNCTION_TYPE + || VOID_TYPE_P (elttype)) + return NULL; + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (ctor), i, val) { conversion *sub |