Hi Richard, Jakub, I've adjusted the ChangeLog; hopefully it'll be good now.
On Tue, Jul 30, 2024 at 12:22:01PM +0200, Richard Biener wrote: > The changes look good to me, please leave the frontend maintainers > time to chime in. Sure; as much as they need. My latest patch (-Wunterminated-string-initialization) took 2 years to get in; I expect __lengthof__, which is a larger feature, to take no less than that. :) Below is a range-diff comparing v1 and v2. BTW, I put the Cc and Link lines before the changelog, because Martin had issues with them while merging and pushing my latest patch. Please let me know if that will work (workaround the scripts). > Also Jakub had reservations with the renaming because of branch > maintainance. I think if that proves an issue we could backport the > renaming as well, or make sure that array_type_nelts is not > re-introduced with the same name but different semantics. I don't expect __lengthof__ to be merged before 2025, and then, I thought we could keep the name array_type_nelts_top() for some time, to prevent issues like that. Anyway, I think backporting this change could be good. So, how does this timeline sound to you? - Rename array_type_nelts() => array_type_nelts_minus_one() now. - Backport that change to stable branches. [... a year or so passes ...] - Make array_type_nelts_top() a global API. - Add __lengthof__. [... a year or so passes ...] - Rename array_type_nelts_top() => array_type_nelts() This would reduce chances of mistakes. Have a lovely day! Alex Alejandro Colomar (1): gcc/: Rename array_type_nelts() => array_type_nelts_minus_one() gcc/c/c-decl.cc | 10 +++++----- gcc/c/c-fold.cc | 7 ++++--- gcc/config/aarch64/aarch64.cc | 2 +- gcc/config/i386/i386.cc | 2 +- gcc/cp/decl.cc | 2 +- gcc/cp/init.cc | 8 ++++---- gcc/cp/lambda.cc | 3 ++- gcc/cp/tree.cc | 2 +- gcc/expr.cc | 8 ++++---- gcc/fortran/trans-array.cc | 2 +- gcc/fortran/trans-openmp.cc | 4 ++-- gcc/rust/backend/rust-tree.cc | 2 +- gcc/tree.cc | 4 ++-- gcc/tree.h | 2 +- 14 files changed, 30 insertions(+), 28 deletions(-) Range-diff against v1: 1: 82efbc3c540 ! 1: 73010cb4af6 gcc/: Rename array_type_nelts() => array_type_nelts_minus_one() @@ Commit message Cc: Martin Uecker <uec...@tugraz.at> Cc: Joseph Myers <josmy...@redhat.com> Cc: Xavier Del Campo Romero <xavi....@tutanota.com> + Cc: Jakub Jelinek <ja...@redhat.com> gcc/ChangeLog: * tree.cc (array_type_nelts): Rename function ... (array_type_nelts_minus_one): ... to this name. The old name was misleading. - * tree.h: Likewise. - * c/c-decl.cc: Likewise. - * c/c-fold.cc: Likewise. - * config/aarch64/aarch64.cc: Likewise. - * config/i386/i386.cc: Likewise. - * cp/decl.cc: Likewise. - * cp/init.cc: Likewise. - * cp/lambda.cc: Likewise. - * cp/tree.cc: Likewise. - * expr.cc: Likewise. - * fortran/trans-array.cc: Likewise. - * fortran/trans-openmp.cc: Likewise. - * rust/backend/rust-tree.cc: Likewise. + * tree.h (array_type_nelts): Rename function ... + (array_type_nelts_minus_one): ... to this name. The old name + was misleading. + * expr.cc (count_type_elements): + Rename array_type_nelts() => array_type_nelts_minus_one() + * config/aarch64/aarch64.cc + (pure_scalable_type_info::analyze_array): Likewise. + * config/i386/i386.cc (ix86_canonical_va_list_type): Likewise. + + gcc/c/ChangeLog: + + * c-decl.cc (one_element_array_type_p, get_parm_array_spec): + Rename array_type_nelts() => array_type_nelts_minus_one() + * c-fold.cc (c_fold_array_ref): Likewise. + + gcc/cp/ChangeLog: + + * decl.cc (reshape_init_array): + Rename array_type_nelts() => array_type_nelts_minus_one() + * init.cc (build_zero_init_1): Likewise. + (build_value_init_noctor): Likewise. + (build_vec_init): Likewise. + (build_delete): Likewise. + * lambda.cc (add_capture): Likewise. + * tree.cc (array_type_nelts_top): Likewise. + + gcc/fortran/ChangeLog: + + * trans-array.cc (structure_alloc_comps): + Rename array_type_nelts() => array_type_nelts_minus_one() + * trans-openmp.cc (gfc_walk_alloc_comps): Likewise. + (gfc_omp_clause_linear_ctor): Likewise. + + gcc/rust/ChangeLog: + + * backend/rust-tree.cc (array_type_nelts_top): + Rename array_type_nelts() => array_type_nelts_minus_one() Suggested-by: Richard Biener <richard.guent...@gmail.com> Signed-off-by: Alejandro Colomar <a...@kernel.org> -- 2.45.2
signature.asc
Description: PGP signature