On Mon, 2010-10-04 at 06:14 -0400, Julian Foad wrote:
> The NULL macro is intended for use as a pointer.

Only when statically cast to the appropriate pointer type.  This happens
automatically in many contexts, such as assignments or prototyped
function parameters.  But it does not happen automatically for variable
parameters of a stdarg function.

So apr_pstrcat(foo, bar, NULL) really is invalid C code.  It's not a
practical concern because common platforms use a single pointer
representation, but it's a fair warning for a compiler to give.

This message brought to you by Language Lawyers Inc.


Reply via email to