Date: Sun, 19 Nov 2017 21:05:42 +1100 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Warner Losh <imp@bsdimp.com> Cc: Bruce Evans <brde@optusnet.com.au>, "Rodney W. Grimes" <rgrimes@freebsd.org>, Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r325954 - in head: . share/mk sys/conf usr.sbin/config Message-ID: <20171119202123.I974@besplex.bde.org> In-Reply-To: <CANCZdfpXR3B8g4ZKR5mx_QjNeTck5u6QwBdB=tNXoDw86zJGdA@mail.gmail.com> References: <CANCZdfrrd9JKxN=ZSi17iK_D=rh5R66pkHH%2BmPmy7wENh90k6Q@mail.gmail.com> <201711180134.vAI1Y2ks064138@pdx.rh.CN85.dnsmgr.net> <CANCZdfod-=vqcZ-NoNmkBPE_--tTcEX6NvyZncR0Bqn%2BrwA=QQ@mail.gmail.com> <20171118190422.V949@besplex.bde.org> <CANCZdfpXR3B8g4ZKR5mx_QjNeTck5u6QwBdB=tNXoDw86zJGdA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 18 Nov 2017, Warner Losh wrote: > On Sat, Nov 18, 2017 at 3:42 AM, Bruce Evans <brde@optusnet.com.au> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171119202123.I974>