Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2004 19:32:55 +0200
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "David O'Brien" <obrien@FreeBSD.org>, Tim Kientzle <kientzle@acm.org>, Mike Barcroft <mike@FreeBSD.org>, Garrett Wollman <wollman@FreeBSD.org>, Dag-Erling Smorgrav <des@FreeBSD.org>, hackers@FreeBSD.org
Subject:   Re: __restrict__  vs __restrict ?
Message-ID:  <20040117173255.GB21742@FreeBSD.org.ua>
In-Reply-To: <20040117171928.GB38009@dragon.nuxi.com>
References:  <40088E75.5080908@acm.org> <20040117015809.GJ9410@FreeBSD.org.ua> <4008B3F9.6010903@acm.org> <20040117171928.GB38009@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040117173255.GB21742>