From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 16 20:03:08 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 9AD0116A4CE; Fri, 16 Jan 2004 20:03:08 -0800 (PST) Received: from kientzle.com (h-66-166-149-50.SNVACAID.covad.net [66.166.149.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5B49943D69; Fri, 16 Jan 2004 20:03:07 -0800 (PST) (envelope-from kientzle@acm.org) Received: from acm.org ([66.166.149.54]) by kientzle.com (8.12.9/8.12.9) with ESMTP id i0H436kX086811; Fri, 16 Jan 2004 20:03:07 -0800 (PST) (envelope-from kientzle@acm.org) Message-ID: <4008B3F9.6010903@acm.org> Date: Fri, 16 Jan 2004 20:03:05 -0800 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031006 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ruslan Ermilov References: <40088E75.5080908@acm.org> <20040117015809.GJ9410@FreeBSD.org.ua> In-Reply-To: <20040117015809.GJ9410@FreeBSD.org.ua> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: hackers@FreeBSD.org cc: Garrett Wollman cc: David O'Brien cc: Dag-Erling Smorgrav cc: Mike Barcroft Subject: Re: __restrict__ vs __restrict ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: kientzle@acm.org 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 04:03:08 -0000 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 , 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