This is the mail archive of the
mailing list for the GCC project.
Re: Website patch: update projects to remove attribute nonnull
> From: "Joseph S. Myers" <email@example.com>
> On Sat, 17 May 2003, Kaveh R. Ghazi wrote:
> > Joseph, IMHO surveying variadic function termination conventions is
> > overdoing it. NULL is pretty much it.
> Another patch around that time
> <http://gcc.gnu.org/ml/gcc-patches/2002-10/msg00802.html> provided for an
> arbitrary constant terminator, not necessarily a pointer, with reference
> to GNOME. I don't know whether in fact there are uses of zero-terminated
> lists of integers, but that patch allowed for them. Surveying what is
> used isn't overdoing it - rather it's avoiding overdoing it by actually
> assessing what is really used and so should be allowed for in the design.
Well, I would question whether whatever they are doing could not be
done safely in another way using existing methods. But since the code
is there in GNOME and Gwenole went through the trouble of creating an
arbitrary terminator patch I withdraw my comments.
> > WRT it's behavior, I read through the thread you cited above, and I
> > think the consensus was that the terminating value must be an integral
> > zero with the same width as a pointer, or any pointer-typed zero.
> > E.g. NULL or (T*)0.
> I think it should be pointer to object typed zero only, not integers (for
> execl style).
Won't that break code using the NULL macro? (Those whose
implementations define it as an integer zero, usually 0 or 0L.)
Kaveh R. Ghazi firstname.lastname@example.org