On Wed, 03 Dec 2014 08:56:44 +0100 Clemens Ladisch <clem...@ladisch.de> wrote:
> James K. Lowden wrote: > > /* Copy N bytes of SRC to DEST. */ > > extern void *memcpy (void *__restrict __dest, > > __const void *__restrict __src, size_t __n) > > __THROW __nonnull ((1, 2)); > > > > IIUC the declaration specifies the pointer cannot be NULL and the > > compiler generates a diagnostic if it notices that it can be. But > > the declaration is strictly stricter than the standard defines. > > Do you have a standard that allows NULL? The one I quoted does not. I'm sure you're right about the standard. I merely observed that my not-too-recent copy of strings.h includes a nonnull attribute. Strictly speaking, that attribute may be "wrong" in the sense that the standard does permit the pointer to be NULL if the length is zero. A compiler may nevertheless emit a diagnostic when it comes across one. For gcc that's triggered with -Wnonnull. I think that might explain the message the OP saw. What to do is another question. SQLite can surely ignore it. If I felt strongly about it, I'd submit a bug report to GCC because IIUC the nonnull attribute syntax provides no way to express the constraint defined by the standard, i.e. "__n > 0 || __nonnull ((1, 2))". --jkl _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users