This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning for unadorned 0 in varargs lists?
* Joe Buck:
> A warning would make sense if, rather than warning for all varargs
> functions, the user only gets a warning for functions that definitely
> expect pointers: execl, for example. It might be better to do this with
> something like the format-checking attributes supported for printf-like
> functions: that is, an attribute that says a varargs function's variable
> arguments are all pointers, or something like that.
"null terminated pointer list", probably. This would also catch the
case where the terminating NULL pointer has been omitted.