Bruno Haible <br...@clisp.org> writes: > Andreas Schwab wrote: >> This is not a bug. NULL is not a valid object pointer. > > Do you mean to say that none of the functions > memchr > memcmp > memcpy > memmove > memset > wmemchr > wmemcmp > wmemcpy > wmemmove > wmemset > may be called with arguments ptr = NULL and n = 0 ?
As described in 7.21.1#2, the pointer argument must always be a valid pointer to an object. > This would certainly be a departure from historical practice. Implementations are free to define undefined behaviour any way they like. The C standard imposes no restrictions on that behaviour. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." _______________________________________________ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils