aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/decl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-09-23 09:34:43 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-09-23 09:34:43 +0200
commitaaa1b10f5419420ef419b6f74299e516f19e5877 (patch)
tree829166a3567a2a3dc49d4bf5253352ed8360678b /gcc/cp/decl.c
parent9500733cc644b84402dce9a53eb32bfa50cfd4a5 (diff)
downloadgcc-aaa1b10f5419420ef419b6f74299e516f19e5877.zip
gcc-aaa1b10f5419420ef419b6f74299e516f19e5877.tar.gz
gcc-aaa1b10f5419420ef419b6f74299e516f19e5877.tar.bz2
* hsa-gen.c (hsa_op_immed::hsa_op_immed Use CONSTRUCTOR_NELTS (...)
instead of vec_safe_length (CONSTRUCTOR_ELTS (...)). (gen_hsa_ctor_assignment): Likewise. * print-tree.c (print_node): Likewise. * tree-dump.c (dequeue_and_dump): Likewise. * tree-sra.c (sra_modify_constructor_assign): Likewise. * expr.c (store_constructor): Likewise. * fold-const.c (operand_equal_p): Likewise. * tree-pretty-print.c (dump_generic_node): Likewise. * hsa-brig.c (hsa_op_immed::emit_to_buffer): Likewise. * ipa-icf-gimple.c (func_checker::compare_operand): Likewise. cp/ * typeck2.c (process_init_constructor_record): Use CONSTRUCTOR_NELTS (...) instead of vec_safe_length (CONSTRUCTOR_ELTS (...)). * decl.c (reshape_init_r): Likewise. (check_initializer): Likewise. ada/ * gcc-interface/decl.c (gnat_to_gnu_entity): Use CONSTRUCTOR_NELTS (...) instead of vec_safe_length (CONSTRUCTOR_ELTS (...)). From-SVN: r240390
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r--gcc/cp/decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 921f8d5..24f71ce 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -5933,7 +5933,7 @@ reshape_init_r (tree type, reshape_iter *d, bool first_initializer_p,
element (as allowed by [dcl.init.string]). */
if (!first_initializer_p
&& TREE_CODE (str_init) == CONSTRUCTOR
- && vec_safe_length (CONSTRUCTOR_ELTS (str_init)) == 1)
+ && CONSTRUCTOR_NELTS (str_init) == 1)
{
str_init = (*CONSTRUCTOR_ELTS (str_init))[0].value;
}
@@ -6136,7 +6136,7 @@ check_initializer (tree decl, tree init, int flags, vec<tree, va_gc> **cleanups)
if (init && BRACE_ENCLOSED_INITIALIZER_P (init))
{
- int init_len = vec_safe_length (CONSTRUCTOR_ELTS (init));
+ int init_len = CONSTRUCTOR_NELTS (init);
if (SCALAR_TYPE_P (type))
{
if (init_len == 0)