diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-05-09 19:24:50 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-05-09 19:24:50 +0000 |
commit | 754af126c04251c045d99b808915d9fde11de8a5 (patch) | |
tree | 1c5d88069cb3be67ae847b2bf84b28808589d61f /gcc/cp/init.c | |
parent | e4c0337862a3d76255d4ad7be49b4435910ede1e (diff) | |
download | gcc-754af126c04251c045d99b808915d9fde11de8a5.zip gcc-754af126c04251c045d99b808915d9fde11de8a5.tar.gz gcc-754af126c04251c045d99b808915d9fde11de8a5.tar.bz2 |
re PR c++/48737 ([C++0x][SFINAE] Hard errors with array list-construction with too many elements)
/cp
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48737
PR c++/48744
* decl.c (reshape_init): Take a complain parameter and do
not call error if tf_error is not set.
(check_initializer, reshape_init_r, reshape_init_array,
reshape_init_array_1, reshape_init_vector, reshape_init_class):
Adjust.
* typeck2.c (digest_init_r): Take a complain parameter and
pass it to convert_for_initialization.
(digest_init, digest_init_flags, process_init_constructor_array,
process_init_constructor_record, process_init_constructor_union,
process_init_constructor, digest_init_r): Adjust.
* init.c (expand_default_init, build_new_1): Likewise.
* typeck.c (cp_build_modify_expr): Likewise.
* decl2.c (grokfield): Likewise.
* call.c (convert_like_real, convert_default_arg): Likewise.
* semantics.c (finish_compound_literal): Pass complain to
reshape_init and digest_init.
* cp-tree.h: Adjust declarations.
/testsuite
2011-05-09 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48737
PR c++/48744
* g++.dg/template/sfinae28.C: New.
* g++.dg/template/sfinae29.C: Likewise.
From-SVN: r173590
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 3eb804d..b71ddfc 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -1435,7 +1435,7 @@ expand_default_init (tree binfo, tree true_exp, tree exp, tree init, int flags, { /* A brace-enclosed initializer for an aggregate. In C++0x this can happen for direct-initialization, too. */ - init = digest_init (type, init); + init = digest_init (type, init, complain); init = build2 (INIT_EXPR, TREE_TYPE (exp), exp, init); TREE_SIDE_EFFECTS (init) = 1; finish_expr_stmt (init); @@ -2378,7 +2378,7 @@ build_new_1 (VEC(tree,gc) **placement, tree type, tree nelts, "verify length of initializer-list"); } arraytype = build_cplus_array_type (type, domain); - vecinit = digest_init (arraytype, vecinit); + vecinit = digest_init (arraytype, vecinit, complain); } else if (*init) { |