From owner-svn-src-head@freebsd.org Sun Nov 19 10:05:44 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C1BD5DF0F0E; Sun, 19 Nov 2017 10:05:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 856977287A; Sun, 19 Nov 2017 10:05:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.103] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 79335D69D98; Sun, 19 Nov 2017 21:05:42 +1100 (AEDT) Date: Sun, 19 Nov 2017 21:05:42 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Bruce Evans , "Rodney W. Grimes" , Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config In-Reply-To: Message-ID: <20171119202123.I974@besplex.bde.org> References: <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <20171118190422.V949@besplex.bde.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.2 cv=bc8baKHB c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=t8Cu4Vj2PK0HrKrpQfMA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Nov 2017 10:05:44 -0000 On Sat, 18 Nov 2017, Warner Losh wrote: > On Sat, Nov 18, 2017 at 3:42 AM, Bruce Evans wrote: > >> since it flags all c99 and newer usages as syntax errors. We've been >>>>> >>>> >> This shouldn't break use of lint on K&R or C90 sources. But types.h is >> broken. It no longer supports K&R, C90, or most other things that are >> supposed to be controlled by the visibility ifdefs in it. > > Thanks for this insightful analysis. I've clipped the rest of it, which is > more of the same. It can't support the new C compiler construct, and we've > managed to break the old ones. Plus it gives lots of warnings that aren't Lint is just the messenger (until its annotations like NOTREACHED are also removed). It can support old C compiler constructs like it used to, including pre-standard ones that new C compilers/checks might not support. > useful and doesn't understand several of the idioms we've started using > heavily in the kernel (such as forward struct declaration). Since many of > these problems are in the system kernel headers, the break all non-trivial > uses of lint. > > None of these things are ever going to be fixed. It's quite likely the We are never going to fix feature test macros like _POSIX_SOURCE? Then removing support for them would give much simpler sources. > kernel will never again compile on anything older than a c99 compiler. > While we have a lot of ifdefs to attempt to support older compilers, it's > almost all certainly bit-rotted from lack of use. The headers and libraries (non-source parts) should not be limited by the language used to compile the kernel. Pascal is not supported, but old variants of C require only a small amount of code relative to new variants, so should remain supported. Kernels don't actually compile with a C99 compiler. They need -std=gnu99 plus lots of underscores to use extensions. The kernel is misconfigured with -std=isomumble:1999 -fms-extensions and only compiles because this doesn't give strict C99 (+ ms extensions but no gnu extensions). Userland is configured correctly with -std=gnu99. Bruce