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

Warner Losh <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <CANCZdfpCRcyS+WM_h+pz9zycjh8TjBCLwC3p971yihUkgO4CWQ@mail.gmail.com>
On Tue, Sep 20, 2022 at 1:09 PM Gary Jennejohn <[email protected]> wrote:

> On Tue, 20 Sep 2022 11:38:01 -0400
> Shawn Webb <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.