From owner-freebsd-current@FreeBSD.ORG Mon May 21 18:21:12 2012 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D89E106566C; Mon, 21 May 2012 18:21:12 +0000 (UTC) (envelope-from jasone@freebsd.org) Received: from canonware.com (10140.x.rootbsd.net [204.109.63.53]) by mx1.freebsd.org (Postfix) with ESMTP id DEE978FC0C; Mon, 21 May 2012 18:21:11 +0000 (UTC) Received: from [172.25.16.174] (unknown [173.252.71.3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by canonware.com (Postfix) with ESMTPSA id E4F7B28416; Mon, 21 May 2012 11:12:55 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=us-ascii From: Jason Evans In-Reply-To: <201205211557.q4LFvmP8031660@freefall.freebsd.org> Date: Mon, 21 May 2012 11:13:07 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <36FD3630-9336-426D-BB4B-293D17CE08B3@freebsd.org> References: <201205211557.q4LFvmP8031660@freefall.freebsd.org> To: Hartmut Brandt X-Mailer: Apple Mail (2.1257) Cc: current@freebsd.org Subject: Re: Syntax error in malloc_np.h X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2012 18:21:12 -0000 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=