On 09/22/2016 02:07 PM, Jakub Jelinek wrote:
Hi!

I've noticed lots of vec_safe_length (CONSTRUCTOR_ELTS (...)) uses
in the sources, which IMHO are less readable than the much more often
used CONSTRUCTOR_NELTS (...) macro that does the same thing.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2016-09-22  Jakub Jelinek  <ja...@redhat.com>

        * 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 (...)).
OK.
jeff

Reply via email to