Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Jan 2004 20:03:05 -0800
From:      Tim Kientzle <kientzle@acm.org>
To:        Ruslan Ermilov <ru@FreeBSD.org>
Cc:        Mike Barcroft <mike@FreeBSD.org>
Subject:   Re: __restrict__  vs __restrict ?
Message-ID:  <4008B3F9.6010903@acm.org>
In-Reply-To: <20040117015809.GJ9410@FreeBSD.org.ua>
References:  <40088E75.5080908@acm.org> <20040117015809.GJ9410@FreeBSD.org.ua>

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

Ruslan Ermilov wrote:
> On Fri, Jan 16, 2004 at 05:23:01PM -0800, Tim Kientzle wrote:
> 
>>Question:  Does anyone know the difference between
>>__restrict and __restrict__?
> 
> __restrict__ is the gcc(1)-only feature.
> __restrict is defined in <sys/cdefs.h>, it's the FreeBSD feature.

A-ha!  That's the part I had missed.  After a few experiments
with gcc -dM -E, I've convinced myself that this is just another
GCC bug.  Basically, -std=c99 -ansi seems to be a very bad compination,
as -std=c99 defines __STDC_VERSION__ to be 199901L and -ansi then
turns off compiler support for c99 features.  Ugh.

>>Should we be using the latter in our system headers?
> 
> No, we should be using the __restrict as coded.  But I wonder why
> we can't just use "restrict"...

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.

Thanks for the clarification.  I'll go crawl back under
my nice, comfortable rock now.

Tim


home | help

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