Hi,

I think it would be a good idea to add some more gcc attribute annotations to our header to mark parameters that must not be NULL, etc. We already have some of these for format string.

In order to not break other compilers, I thought to just include

#if !defined(__GNUC__)
#define __attribute__(x)
#endif

at the top. Or would it be better to have something like

#if defined(__GNUC__)
#define APR_NONNULL(x) __attribute__((nonnull(x)))
#else
#define APR_NONNULL(x)
#endif

for every attribute? Would these macros be a new API that needs to wait for 1.5.x?

Cheers,
Stefan

Reply via email to