https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61236
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The glibc prototype for qsort is: extern void qsort (void *__base, size_t __nmemb, size_t __size, __compar_fn_t __compar) __nonnull ((1, 4)); therefore when you pass x to it, gcc derives from that that x must not be NULL. As ISO C99 says that qsort sorts an array of nmemb objects, I'd say the glibc prototype is correct and therefore BIND is buggy, because NULL is not an address of any object.