diff options
author | Jason Merrill <jason@redhat.com> | 2011-04-14 11:00:15 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-04-14 11:00:15 -0400 |
commit | e2a009c710b96a3dcb81eba7ff574fd53f68fea5 (patch) | |
tree | 357337d39e99a9917ac8644ac24f1950ce00441b /gcc/cp/init.c | |
parent | a66e8081b522edc78354e41ded044a597dc100d9 (diff) | |
download | gcc-e2a009c710b96a3dcb81eba7ff574fd53f68fea5.zip gcc-e2a009c710b96a3dcb81eba7ff574fd53f68fea5.tar.gz gcc-e2a009c710b96a3dcb81eba7ff574fd53f68fea5.tar.bz2 |
re PR c++/48531 ([C++0x][SFINAE] Hard errors with arrays of unknown bound)
PR c++/48531
* init.c (build_value_init_noctor): Check complain consistently.
From-SVN: r172434
Diffstat (limited to 'gcc/cp/init.c')
-rw-r--r-- | gcc/cp/init.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/init.c b/gcc/cp/init.c index 32afa03..fad7f0c 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -422,7 +422,9 @@ build_value_init_noctor (tree type, tsubst_flags_t complain) as we don't know the size of the array yet. */ if (max_index == error_mark_node) { - error ("cannot value-initialize array of unknown bound %qT", type); + if (complain & tf_error) + error ("cannot value-initialize array of unknown bound %qT", + type); return error_mark_node; } gcc_assert (TREE_CODE (max_index) == INTEGER_CST); |