Date: Mon, 21 May 2012 11:13:07 -0700 From: Jason Evans <jasone@freebsd.org> To: Hartmut Brandt <harti@FreeBSD.org> Cc: current@freebsd.org Subject: Re: Syntax error in malloc_np.h Message-ID: <36FD3630-9336-426D-BB4B-293D17CE08B3@freebsd.org> In-Reply-To: <201205211557.q4LFvmP8031660@freefall.freebsd.org> References: <201205211557.q4LFvmP8031660@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On May 21, 2012, at 8:57 AM, Hartmut Brandt wrote:
> it seems that there is a syntax error in malloc_np.h. It contains =
lines like:
>=20
> int allocm(void **ptr, size_t *rsize, size_t size, int flags)
> __attribute__(nonnull(1));
>=20
> The problem is that the syntax of the attributes actually requires two
> parenthesis:
>=20
> __attribute__((nonnull(1)));
>=20
> Our gcc seems to swallow either of both, but gcc47 chokes on the =
missing
> '(' as does clang++.
>=20
> Given that we have __nonnull(x) in cdefs.h I suppose the above is =
better
> replaced with __nonnull(1)?
__nonnull(1) looks like the best fix to me. Let me know if you want me =
to make the fix, otherwise I'll leave it to you.
Thanks,
Jason=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?36FD3630-9336-426D-BB4B-293D17CE08B3>
