Re: __restrict__ vs __restrict ?

2004-01-19 Thread Harti Brandt
On Sat, 17 Jan 2004, David O'Brien wrote: DOOn Fri, Jan 16, 2004 at 08:03:05PM -0800, Tim Kientzle wrote: DO No, we should be using the __restrict as coded. But I wonder why DO we can't just use restrict... DO DO Because that would really mess up any user program that used DO 'restrict' as a

Re: __restrict__ vs __restrict ?

2004-01-19 Thread David O'Brien
On Mon, Jan 19, 2004 at 02:41:26PM +0100, Harti Brandt wrote: On Sat, 17 Jan 2004, David O'Brien wrote: DOOn Fri, Jan 16, 2004 at 08:03:05PM -0800, Tim Kientzle wrote: DO No, we should be using the __restrict as coded. But I wonder why DO we can't just use restrict... DO DO Because that

Re: __restrict__ vs __restrict ?

2004-01-19 Thread Ruslan Ermilov
On Mon, Jan 19, 2004 at 08:17:19AM -0800, David O'Brien wrote: On Mon, Jan 19, 2004 at 02:41:26PM +0100, Harti Brandt wrote: [...] What about third party code that reads cdefs.h and is pre-c99? It's perfectly ok to use restrict as a name there. Its also perfectly OK to use 'exp' as a

Re: __restrict__ vs __restrict ?

2004-01-19 Thread David O'Brien
On Mon, Jan 19, 2004 at 09:20:24PM +0200, Ruslan Ermilov wrote: If we decide now that our kernel should be C99 clean, we should compile it with -std=c99, and replace all `__restrict''s in not headers with C99 `restrict's. $ grep -- -std /sys/conf/* /sys/conf/kern.mk:

Re: __restrict__ vs __restrict ?

2004-01-17 Thread David O'Brien
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... Because that would really mess up any user program that used 'restrict' as a variable or function name. I think the current approach

Re: __restrict__ vs __restrict ?

2004-01-17 Thread Ruslan Ermilov
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... Because that would really mess up any user program that used

__restrict__ vs __restrict ?

2004-01-16 Thread Tim Kientzle
I've been enabling a LOT of gcc warnings recently in the process of linting some code I'm writing. In the process, I stumbled across the following curiosity: cat test.c #include stdio.h gcc -std=c99 -ansi test.c In file included from test.c:1: /usr/include/stdio.h:220: conflicting types for

Re: __restrict__ vs __restrict ?

2004-01-16 Thread Ruslan Ermilov
On Fri, Jan 16, 2004 at 05:23:01PM -0800, Tim Kientzle wrote: I've been enabling a LOT of gcc warnings recently in the process of linting some code I'm writing. In the process, I stumbled across the following curiosity: cat test.c #include stdio.h gcc -std=c99 -ansi test.c In file

Re: __restrict__ vs __restrict ?

2004-01-16 Thread Tim Kientzle
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