From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 16 17:23:04 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 0EBCA16A4CE for ; Fri, 16 Jan 2004 17:23:04 -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 C169743D5D for ; Fri, 16 Jan 2004 17:23:02 -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 i0H1N2kX086130 for ; Fri, 16 Jan 2004 17:23:02 -0800 (PST) (envelope-from kientzle@acm.org) Message-ID: <40088E75.5080908@acm.org> Date: Fri, 16 Jan 2004 17:23:01 -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: "'freebsd-hackers@freebsd.org'" Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: __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 01:23:04 -0000 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 > gcc -std=c99 -ansi test.c In file included from test.c:1: /usr/include/stdio.h:220: conflicting types for `restrict' /usr/include/stdio.h:220: previous declaration of `restrict' /usr/include/stdio.h:221: conflicting types for `restrict' /usr/include/stdio.h:221: previous declaration of `restrict' /usr/include/stdio.h:222: redefinition of `restrict' /usr/include/stdio.h:222: `restrict' previously declared here /usr/include/stdio.h:223: conflicting types for `restrict' [ .... many similar lines omitted .... ] If I change all "__restrict" in stdio.h to "__restrict__", these warnings disappear. Question: Does anyone know the difference between __restrict and __restrict__? Should we be using the latter in our system headers? Tim