* Jakub Jelinek: > How do you express that with access attribute, which can only have 1 > size argument?
Don't we sometimes use inline functions to handle such special cases? > For the rest, perhaps we need some nonnull_if_nonzero argument > which requires that the parameter identified by the first attribute > argument must be pointer which is non-NULL if the parameter identified > by the second attribute argument is non-zero. > And get clarified the qsort/bsearch cases whether it is about just > nmemb == 0 or nmemb * size == 0. C does not support zero-sized objects, so that's something for us to figure out on our own. We can treat size == 0 as invalid because the functions can't work, as they use pointers for the comparison function and not array indices.