From owner-freebsd-hackers@FreeBSD.ORG Sat Jan 17 09:32:23 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7FCEF16A4CE; Sat, 17 Jan 2004 09:32:23 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C9F943D2D; Sat, 17 Jan 2004 09:32:20 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i0HHWujm021909; Sat, 17 Jan 2004 19:32:56 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i0HHWtJn021904; Sat, 17 Jan 2004 19:32:55 +0200 (EET) (envelope-from ru) Date: Sat, 17 Jan 2004 19:32:55 +0200 From: Ruslan Ermilov To: "David O'Brien" , Tim Kientzle , Mike Barcroft , Garrett Wollman , Dag-Erling Smorgrav , hackers@FreeBSD.org Message-ID: <20040117173255.GB21742@FreeBSD.org.ua> References: <40088E75.5080908@acm.org> <20040117015809.GJ9410@FreeBSD.org.ua> <4008B3F9.6010903@acm.org> <20040117171928.GB38009@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="H1spWtNR+x+ondvy" Content-Disposition: inline In-Reply-To: <20040117171928.GB38009@dragon.nuxi.com> User-Agent: Mutt/1.5.5.1i Subject: Re: __restrict__ vs __restrict ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Jan 2004 17:32:23 -0000 --H1spWtNR+x+ondvy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 17, 2004 at 09:19:28AM -0800, David O'Brien wrote: > On Fri, Jan 16, 2004 at 08:03:05PM -0800, Tim Kientzle wrote: > > >No, we should be using the __restrict as coded. But I wonder why > > >we can't just use "restrict"... > >=20 > > Because that would really mess up any user program that used > > 'restrict' as a variable or function name. I think the > > current approach is the best. >=20 > Such code isn't portable to C99, which is still a goal of ours. I like > RU's suggestion, because it is straight C[99] code and not an > abstraction. I'll do a 'make world' test and see if we'd have trouble > with RU's form. >=20 The code I've posted has obvious troubles. It would take care of the following fragment for -std=3Dc89 and be pure C99 for -std=3Dc99, void foo(char * restrict fa) { } but will break this for -std=3Dc89: void restrict(void) { } We have a problem if we want to mix old C89 and new C99 code. Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --H1spWtNR+x+ondvy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFACXHHUkv4P6juNwoRAh40AJ91MCs99R3UCpY4vQqW0F5CzsLzwQCfYFrU qMB3pP/ecj1+xejgWyn1dOA= =O5Xy -----END PGP SIGNATURE----- --H1spWtNR+x+ondvy--