On Tue, May 11, 2010 at 11:53:14AM -0400, Eric Brine wrote: > On Tue, May 11, 2010 at 11:38 AM, Nicholas Clark <nick@ccl4.org> wrote: > > > > I suspect that the reader/rejector assumed that the indexes for notnull() > > > start at 0. They start at 1. If you make that mistake, you would conclude > > > (wrongly) what the rejector did. > > > > Gah. I think I'm wrong here. I'm not convinced that the test case is > > correct. > > > > What you say matches the docs: > > extern void * > my_memcpy (void *dest, const void *src, size_t len) > __attribute__((nonnull (1, 2))); > > causes the compiler to check that, in calls to my_memcpy, arguments dest and > src are non-null. > > so nonnull(2) would apply to o, the 2nd arg. But the bug (in op.c) was when the final (3rd) argument oright was annotated as non-null, but gcc was treating the 2nd argument, o, as non-null. Nicholas ClarkThread Previous | Thread Next