diff options
author | Jason Merrill <jason@redhat.com> | 2011-04-17 20:50:31 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-04-17 20:50:31 -0400 |
commit | 4ddd8a74ba5c23b5dd69d7b501a1d8c4ad053b4b (patch) | |
tree | cbdcad160c4dcac6149cddb741dbdbd9a60c22f1 /gcc/cp/init.c | |
parent | 991e015686a39b50e4a756b463d250aeb07267f6 (diff) | |
download | gcc-4ddd8a74ba5c23b5dd69d7b501a1d8c4ad053b4b.zip gcc-4ddd8a74ba5c23b5dd69d7b501a1d8c4ad053b4b.tar.gz gcc-4ddd8a74ba5c23b5dd69d7b501a1d8c4ad053b4b.tar.bz2 |
re PR c++/48531 ([C++0x][SFINAE] Hard errors with arrays of unknown bound)
PR c++/48531
* typeck2.c (build_functional_cast): Disallow array type.
From-SVN: r172632
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index fad7f0c..3280d9b 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -369,6 +369,8 @@ build_value_init (tree type, tsubst_flags_t complain) tree build_value_init_noctor (tree type, tsubst_flags_t complain) { + /* FIXME the class and array cases should just use digest_init once it is + SFINAE-enabled. */ if (CLASS_TYPE_P (type)) { gcc_assert (!TYPE_NEEDS_CONSTRUCTING (type)); @@ -450,7 +452,9 @@ build_value_init_noctor (tree type, tsubst_flags_t complain) if (ce->value == error_mark_node) return error_mark_node; - /* The gimplifier can't deal with a RANGE_EXPR of TARGET_EXPRs. */ + /* We shouldn't have gotten here for anything that would need + non-trivial initialization, and gimplify_init_ctor_preeval + would need to be fixed to allow it. */ gcc_assert (TREE_CODE (ce->value) != TARGET_EXPR && TREE_CODE (ce->value) != AGGR_INIT_EXPR); } |