From owner-svn-src-all@FreeBSD.ORG Sun Jun 21 19:25:29 2015 Return-Path: Delivered-To: svn-src-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3B98BD4; Sun, 21 Jun 2015 19:25:29 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail108.syd.optusnet.com.au (mail108.syd.optusnet.com.au [211.29.132.59]) by mx1.freebsd.org (Postfix) with ESMTP id 621D3BB4; Sun, 21 Jun 2015 19:25:28 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail108.syd.optusnet.com.au (Postfix) with ESMTPS id EDD491A23BF; Mon, 22 Jun 2015 05:25:25 +1000 (AEST) Date: Mon, 22 Jun 2015 05:25:24 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Pedro Giffuni cc: Bruce Evans , Dimitry Andric , David Chisnall , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r268137 - head/sys/sys In-Reply-To: <5587047A.2060007@FreeBSD.org> Message-ID: <20150622045721.W3492@besplex.bde.org> References: <201407020845.s628jRG5031824@svn.freebsd.org> <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org> <55842F16.5040608@FreeBSD.org> <20150620023835.N2562@besplex.bde.org> <55861046.4050501@FreeBSD.org> <20150621154332.U976@besplex.bde.org> <5586CBCE.2010608@FreeBSD.org> <20150622012426.S2603@besplex.bde.org> <5586E219.2010805@FreeBSD.org> <20150622022837.D2823@besplex.bde.org> <5587047A.2060007@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=XMDNMlVE c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=xVeHPsXgE_qfO4LVfbgA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Sun, 21 Jun 2015 19:25:29 -0000 On Sun, 21 Jun 2015, Pedro Giffuni wrote: > On 06/21/15 11:48, Bruce Evans wrote: >> On Sun, 21 Jun 2015, Pedro Giffuni wrote: >>> ... >>> Well, the fact this we just do this in the tree and no one has bothered to >>> "clean" the situation for older compilers just indicates that no one >>> *cares* >>> about older compilers. >> >> No, we don't do this with older compilers, except for for a couple of >> pre-C90 cases. We are careful to only define names in our namespace, >> e.g., __signed but not the C90 keyword 'signed'. This is still fragile. >> __signed is a keyword for gcc, and it is confusing that some of our use >> of it require it to have the gcc meaning. __signed is in the >> implementation >> namespace so we don't own it completely. This is what is now causing >> problems >> with defining __weak. > > We have plenty of C++-style comments and C99 initializers in the tree. Headers cannot use these unconditionally. FreeBSD attempts to support: - user code written in K&R C using __P(()) to ifdef for prototypes. __P(()) and missing prototypes still turn up frequently. Most recently in zfs code with missing prototypes. - ISO C90, including all C90 compilers, all C90 headers and all C90 libraries - POSIX.1-1990. - the POSIX.2 compiler c89. This is one of the C90 compilers. Actually it is C94 or C95 (-std=iso9899:199409). c89 is especially strict. Most carefully written C90 code can be compiled by a C11 compiler with C11 constructs in compiled but not really used parts of standard headers. But c89 forces the compiler/language back to an old standard. This requires the visible parts of standard headers to be written carefully to the old standard too. The support mostly works. The only brokenness that I know of in it is the stdarg thing. I defended against breaking it by using variadic macros Bruce