* lib/argp-help.c (struct hol): Mark the entries fields as counted_by
num_entries. Swap these fields (needed for clang, see
<https://discourse.llvm.org/t/rfc-forward-referencing-a-struct-member-within-bounds-annotations/85510>).
+2026-05-03 Bruno Haible <bruno@clisp.org>
+
+ argp: Use the counted_by attribute.
+ * lib/argp-help.c (struct hol): Mark the entries fields as counted_by
+ num_entries. Swap these fields (needed for clang, see
+ <https://discourse.llvm.org/t/rfc-forward-referencing-a-struct-member-within-bounds-annotations/85510>).
+
2026-05-03 Bruno Haible <bruno@clisp.org>
dfa: Remove a redundant forward declaration.
/* A list of options for help. */
struct hol
{
- /* An array of hol_entry's. */
- struct hol_entry *entries;
/* The number of entries in this hol. If this field is zero, entries and
short_options are undefined. */
unsigned num_entries;
+ /* An array of hol_entry's. */
+ struct hol_entry *entries
+ _GL_ATTRIBUTE_COUNTED_BY (num_entries);
/* A string containing all short options in this HOL. Each entry contains
pointers into this string, so the order can't be messed with blindly. */