Hi Werner,
malloc(0)
isn't undefined behaviour but implementation defined.
In modern C there is no difference between those two concepts.
Can you explain more about your view or give a link if it's an accepted
opinion. I'm used to an implementation stating its choices from those
given by a C standard, e.g.
(42) Whether the calloc, malloc, realloc, and aligned_alloc functions
return a null pointer or a pointer to an allocated object when
the size requested is zero (7.24.3).
I'd call malloc(0) and know it's not undefined behaviour but one of
those choices.
--
Cheers, Ralph.