CCing Bruno because of his involvement with the Gnulib list modules.
Disallowing NULL list elements could break existing code that actually uses them but returning elements with type void * instead of const void * would be much less incompatible. Code can trivially be ported to such an updated interface (for example, in my snippet above, I would have to replace 'const void *e' with 'void *e', All in all, it would make working with the code a lot easier.
For lists where there are no non-null list elements, one could add
void *gl_list_iterator_next_element_or_null (gl_list_iterator_t iter, gl_list_node_t *node_ptr)
{
void *e;
return gl_list_iterator_next (iter, &e, node_ptr) ? e : NULL;
}
to the global API (modulo a better name for the procedure).