diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/call.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d1db746..4f5f9b5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2009-11-17 Jakub Jelinek <jakub@redhat.com> + PR c++/42061 + * call.c (reference_binding): Return NULL for initializer list with + error operand inside of it. + PR c++/42059 * typeck.c (cp_build_modify_expr): For initializer list call check_array_initializer to make sure lhs isn't a VLA. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index e4a6bca3..e051e90 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -1235,6 +1235,8 @@ reference_binding (tree rto, tree rfrom, tree expr, bool c_cast_p, int flags) && CONSTRUCTOR_NELTS (expr) == 1) { expr = CONSTRUCTOR_ELT (expr, 0)->value; + if (error_operand_p (expr)) + return NULL; from = TREE_TYPE (expr); } } |