diff options
author | Jason Merrill <jason@redhat.com> | 2010-07-27 18:06:03 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-07-27 18:06:03 -0400 |
commit | 462aa169acee3e6dcfad17165aa7fc68ad417409 (patch) | |
tree | 006042e9b7977e67d56f3ee4b12aba0da516f847 /gcc/cp/init.c | |
parent | 418e920fc6c08a3f9b20a6996980c7380cbac67c (diff) | |
download | gcc-462aa169acee3e6dcfad17165aa7fc68ad417409.zip gcc-462aa169acee3e6dcfad17165aa7fc68ad417409.tar.gz gcc-462aa169acee3e6dcfad17165aa7fc68ad417409.tar.bz2 |
pt.c (tsubst_expr): Handle getting an AGGR_INIT_EXPR from build_value_init.
* pt.c (tsubst_expr) [DECL_EXPR]: Handle getting an AGGR_INIT_EXPR
from build_value_init.
* init.c (build_value_init_noctor): Give error for unknown array
bound.
From-SVN: r162603
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index d796fd0..0edb800 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -379,7 +379,10 @@ build_value_init_noctor (tree type) /* If we have an error_mark here, we should just return error mark as we don't know the size of the array yet. */ if (max_index == error_mark_node) - return error_mark_node; + { + error ("cannot value-initialize array of unknown bound %qT", type); + return error_mark_node; + } gcc_assert (TREE_CODE (max_index) == INTEGER_CST); /* A zero-sized array, which is accepted as an extension, will |