From owner-svn-src-all@FreeBSD.ORG Wed Dec 14 03:26:05 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB6C9106564A; Wed, 14 Dec 2011 03:26:05 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 43F9C8FC1F; Wed, 14 Dec 2011 03:26:04 +0000 (UTC) Received: from c211-28-227-231.carlnfd1.nsw.optusnet.com.au (c211-28-227-231.carlnfd1.nsw.optusnet.com.au [211.28.227.231]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id pBE3Q1JL024399 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 14 Dec 2011 14:26:02 +1100 Date: Wed, 14 Dec 2011 14:26:01 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Stefan Farfeleder In-Reply-To: <20111213144539.GB1587@mole.fafoe.narf.at> Message-ID: <20111214140737.J1950@besplex.bde.org> References: <201112131406.pBDE61bc053693@svn.freebsd.org> <20111213144539.GB1587@mole.fafoe.narf.at> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Schouten Subject: Re: svn commit: r228471 - in head/sys: boot/arm/at91/libat91 dev/cm dev/de dev/fdc dev/pccard dev/spibus dev/xen/netback pc98/cbus X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Dec 2011 03:26:05 -0000 On Tue, 13 Dec 2011, Stefan Farfeleder wrote: >> Log: >> Replace `inline static' by `static inline'. >> >> If I interpret the C standard correctly, the storage specifier should be >> placed before the inline keyword. While at it, replace __inline by >> inline in the files affected. > > No, declaration-specifier is defined recursively - any order is allowed. > Still I think having a consistent order is a good idea. And using inline instead of __inline breaks C90 compilers. Unline const and signed, inline is new in C99, and there are still usable C90 compilers (e.g., c89, gcc -std=c89 and old(?) versions of TenDRA) which will break if it is spelled inline. C90 compilers should also break if it is spelled __inline, but it is easier to annul if is spelled __inline, and already supports this. c89 and gcc -std=c89 apparently are not C compilers (even with -pedantic), since they accept __inline. They don't accept inline. The support in for annuling __inline works automatically for TenDRA-4.20040902 -Ysystem (-Ysystem makes it use the system headers). When __inline is attached to static, annuling it doesn't change the semantics. Annuling it is not so safe for extern inline, but might work for at least individual source files. I mainly use TenDRA for its portability checks and better diagnostics of standards violations. Support for C90 in headers and no C99 code in the files being checked is enough for this. Bruce