This is okay. There is one caller of re_node_set_remove_at, in
regexec.c, which might pass SIZE_MAX as the second parameter to
re_node_set_remove_at. This works, but I'd make sure this does not
happen by doing this:
... this is wrong, and in fact the entire castle crumbles because of
this patch. Idx i.e. __re_idx_t is size_t, but it replaced int with
Paul Eggert's patch to support >2GB subjects and regexes (which Uli
rejected upstream).
If you wish, feel free to commit to gnulib the other patches (plus the
regexec.c hunk above). However, I think it's better to make a different
patch, which defines __re_idx_t as ptrdiff_t. Such a patch would also
remove the
if ((Idx) -1 < 0 || end != REG_MISSING)
condition from regcomp.c which is absent upstream. Also, with this
alternative patch the change to regexec.c that I suggested above would
be unnecessary.