Re: Stlye(9) strengthen statements on not using K&R function definitions

From: Warner Losh <imp_at_bsdimp.com>
Date: Tue, 20 Sep 2022 20:59:48 UTC
On Tue, Sep 20, 2022 at 1:09 PM Gary Jennejohn <garyj@gmx.de> wrote:

> On Tue, 20 Sep 2022 11:38:01 -0400
> Shawn Webb <shawn.webb@hardenedbsd.org> wrote:
>
> > On Tue, Jul 26, 2022 at 10:31:17AM -0600, Warner Losh wrote:
> > > Greetings
> > >
> > > I've posted a review https://reviews.freebsd.org/D35945 which
> strengths
> > > statements about K&R definitions and declarations: don't use them.
> Most of
> > > the K&R code has been removed from the tree (ufs being the last
> straggler).
> > > Future versions of the C standard will remove the K&R definitions and
> > > declaration syntax. clang 15 will whine about this construct.
> > >
> > > The time is ripe to move to language that suggests an outright
> prohibition.
> > >
> > > Comments about language? Make them in phabricator.
> > > Comments about the idea? Reply here
> >
> > FYI: I did notice the other day that less(1) strictly uses K&R.
> >
>
> Yes, but less is under contrib.  The K&R purge should be limited to pure
> FreeBSD code IMHO.
>

style(9) has never been about contrib code. less likely will need to update
if it wants to keep building on newer compilers, and we'll pickup those
changes.

Warner