Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Dec 2022 10:56:32 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Dimitry Andric <dim@freebsd.org>, src-committers@freebsd.org,  dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 526f57bf85a2 - main - Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for clang 15.
Message-ID:  <CANCZdfpkY%2BAwoOUFw-HX57T6=%2BMgMZP=0eoAc6Mj0Fc96NVqVA@mail.gmail.com>
In-Reply-To: <5a772eb7-55c8-5e73-e346-5514ef144dc3@FreeBSD.org>
References:  <202212251159.2BPBxmAG029954@gitrepo.freebsd.org> <5a772eb7-55c8-5e73-e346-5514ef144dc3@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000080171605f0d2f912
Content-Type: text/plain; charset="UTF-8"

On Tue, Dec 27, 2022 at 10:40 AM John Baldwin <jhb@freebsd.org> wrote:

> On 12/25/22 3:59 AM, Dimitry Andric wrote:
> > The branch main has been updated by dim:
> >
> > URL:
> https://cgit.FreeBSD.org/src/commit/?id=526f57bf85a2b9b113c55ded47b932abc8567bc5
> >
> > commit 526f57bf85a2b9b113c55ded47b932abc8567bc5
> > Author:     Dimitry Andric <dim@FreeBSD.org>
> > AuthorDate: 2022-07-25 10:29:58 +0000
> > Commit:     Dimitry Andric <dim@FreeBSD.org>
> > CommitDate: 2022-12-25 11:58:22 +0000
> >
> >      Update CWARNFLAGS in bsd.sys.mk and CWARNEXTRA in kern.mk for
> clang 15.
> >
> >      MFC after:      3 days
> > ---
> >   share/mk/bsd.sys.mk | 17 +++++++++++++++--
> >   sys/conf/kern.mk    |  4 ++++
> >   2 files changed, 19 insertions(+), 2 deletions(-)
> >
> > diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
> > index a220c9d173ed..43359fed29c7 100644
> > --- a/share/mk/bsd.sys.mk
> > +++ b/share/mk/bsd.sys.mk
> > @@ -86,6 +94,11 @@ CWARNFLAGS.clang+= -Wno-unused-const-variable
> >   .if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 130000
> >   CWARNFLAGS.clang+=  -Wno-error=unused-but-set-variable
> >   .endif
> > +.if ${COMPILER_TYPE} == "clang" && ${COMPILER_VERSION} >= 150000
> > +CWARNFLAGS.clang+=   -Wno-error=array-parameter
>
> I've fixed all these that GCC 12 finds.  Do we really need to disable it
> for clang
> now after I've pushed those recent fixes?
>

I agree: I don't think we need this at all anymore, though we have the
perennial problem
of building stable on current, but this won't fix that...

I think I've done a full bootstrap with clang15 on MacOS since you've
imported your
changes, and I didn't see this error.


> > +CWARNFLAGS.clang+=   -Wno-error=deprecated-non-prototype
>
> I'm curious how many places are broken by this and how much it would be to
> fix?
> This is just adding '(void)' in place of '()', yes?
>

I believe that only () are left in the tree, except for one, maybe two
upstreams that still
support old K&R compilers (I'm looking at you libz) that need this flag. I
also think that
the bulk of the in-tree () have been converted to (void) (I've done a
bunch, and others have
been quicker to commit than I for at least some of these so I got conflicts
on merge,but for
this, that's cool).

Warner

--00000000000080171605f0d2f912
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Tue, Dec 27, 2022 at 10:40 AM John=
 Baldwin &lt;<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>&gt; wro=
te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px =
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 12/25/22 =
3:59 AM, Dimitry Andric wrote:<br>
&gt; The branch main has been updated by dim:<br>
&gt; <br>
&gt; URL: <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3D526f57bf85a2=
b9b113c55ded47b932abc8567bc5" rel=3D"noreferrer" target=3D"_blank">https://=
cgit.FreeBSD.org/src/commit/?id=3D526f57bf85a2b9b113c55ded47b932abc8567bc5<=
/a><br>
&gt; <br>
&gt; commit 526f57bf85a2b9b113c55ded47b932abc8567bc5<br>
&gt; Author:=C2=A0 =C2=A0 =C2=A0Dimitry Andric &lt;dim@FreeBSD.org&gt;<br>
&gt; AuthorDate: 2022-07-25 10:29:58 +0000<br>
&gt; Commit:=C2=A0 =C2=A0 =C2=A0Dimitry Andric &lt;dim@FreeBSD.org&gt;<br>
&gt; CommitDate: 2022-12-25 11:58:22 +0000<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0 Update CWARNFLAGS in <a href=3D"http://bsd.sys.mk"=
 rel=3D"noreferrer" target=3D"_blank">bsd.sys.mk</a> and CWARNEXTRA in <a h=
ref=3D"http://kern.mk" rel=3D"noreferrer" target=3D"_blank">kern.mk</a> for=
 clang 15.<br>
&gt;=C2=A0 =C2=A0 =C2=A0 <br>
&gt;=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days<br>
&gt; ---<br>
&gt;=C2=A0 =C2=A0share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" =
target=3D"_blank">bsd.sys.mk</a> | 17 +++++++++++++++--<br>
&gt;=C2=A0 =C2=A0sys/conf/<a href=3D"http://kern.mk" rel=3D"noreferrer" tar=
get=3D"_blank">kern.mk</a>=C2=A0 =C2=A0 |=C2=A0 4 ++++<br>
&gt;=C2=A0 =C2=A02 files changed, 19 insertions(+), 2 deletions(-)<br>
&gt; <br>
&gt; diff --git a/share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer"=
 target=3D"_blank">bsd.sys.mk</a> b/share/mk/<a href=3D"http://bsd.sys.mk" =
rel=3D"noreferrer" target=3D"_blank">bsd.sys.mk</a><br>
&gt; index a220c9d173ed..43359fed29c7 100644<br>
&gt; --- a/share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" target=
=3D"_blank">bsd.sys.mk</a><br>
&gt; +++ b/share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" target=
=3D"_blank">bsd.sys.mk</a><br>
&gt; @@ -86,6 +94,11 @@ CWARNFLAGS.clang+=3D -Wno-unused-const-variable<br>
&gt;=C2=A0 =C2=A0.if ${COMPILER_TYPE} =3D=3D &quot;clang&quot; &amp;&amp; $=
{COMPILER_VERSION} &gt;=3D 130000<br>
&gt;=C2=A0 =C2=A0CWARNFLAGS.clang+=3D=C2=A0 -Wno-error=3Dunused-but-set-var=
iable<br>
&gt;=C2=A0 =C2=A0.endif<br>
&gt; +.if ${COMPILER_TYPE} =3D=3D &quot;clang&quot; &amp;&amp; ${COMPILER_V=
ERSION} &gt;=3D 150000<br>
&gt; +CWARNFLAGS.clang+=3D=C2=A0 =C2=A0-Wno-error=3Darray-parameter<br>
<br>
I&#39;ve fixed all these that GCC 12 finds.=C2=A0 Do we really need to disa=
ble it for clang<br>
now after I&#39;ve pushed those recent fixes?<br></blockquote><div><br></di=
v><div>I agree: I don&#39;t think we need this at all anymore, though we ha=
ve the perennial problem</div><div>of building stable on current, but this =
won&#39;t fix that...</div><div><br></div><div>I think I&#39;ve done a full=
 bootstrap with clang15 on MacOS since you&#39;ve imported your</div><div>c=
hanges, and I didn&#39;t see this error.</div><div>=C2=A0</div><blockquote =
class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px sol=
id rgb(204,204,204);padding-left:1ex">
&gt; +CWARNFLAGS.clang+=3D=C2=A0 =C2=A0-Wno-error=3Ddeprecated-non-prototyp=
e<br>
<br>
I&#39;m curious how many places are broken by this and how much it would be=
 to fix?<br>
This is just adding &#39;(void)&#39; in place of &#39;()&#39;, yes?<br></bl=
ockquote><div><br></div><div>I believe that only () are left in the tree, e=
xcept for one, maybe two upstreams that still</div><div>support old K&amp;R=
 compilers (I&#39;m looking at you libz) that need this flag. I also think =
that</div><div>the bulk of the in-tree () have been converted to (void) (I&=
#39;ve done a bunch, and others have</div><div>been quicker to commit than =
I for at least some of these so I got conflicts on merge,but for</div><div>=
this, that&#39;s cool).</div><div><br></div><div>Warner</div><div><br></div=
></div></div>

--00000000000080171605f0d2f912--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpkY%2BAwoOUFw-HX57T6=%2BMgMZP=0eoAc6Mj0Fc96NVqVA>