This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Website patch: update projects to remove attribute nonnull
On Tue, 20 May 2003, Kaveh R. Ghazi wrote:
> > 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.)
Such code is broken because conforming implementations may use the integer
type: NULL cannot be used uncast as a variadic argument (and in principle
we could detect the use of the NULL macro in such a case and warn for it).
Thus the warning, detecting broken code with an uncast NULL (as was in an
example in a POSIX draft until the problem was pointed out and fixed), is
appropriate.
--
Joseph S. Myers
jsm28@cam.ac.uk