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 <<a href=3D"mailto:jhb@freebsd.org">jhb@freebsd.org</a>> 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> > The branch main has been updated by dim:<br> > <br> > 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> > <br> > commit 526f57bf85a2b9b113c55ded47b932abc8567bc5<br> > Author:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><br> > AuthorDate: 2022-07-25 10:29:58 +0000<br> > Commit:=C2=A0 =C2=A0 =C2=A0Dimitry Andric <dim@FreeBSD.org><br> > CommitDate: 2022-12-25 11:58:22 +0000<br> > <br> >=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> >=C2=A0 =C2=A0 =C2=A0 <br> >=C2=A0 =C2=A0 =C2=A0 MFC after:=C2=A0 =C2=A0 =C2=A0 3 days<br> > ---<br> >=C2=A0 =C2=A0share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" = target=3D"_blank">bsd.sys.mk</a> | 17 +++++++++++++++--<br> >=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> >=C2=A0 =C2=A02 files changed, 19 insertions(+), 2 deletions(-)<br> > <br> > 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> > index a220c9d173ed..43359fed29c7 100644<br> > --- a/share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" target= =3D"_blank">bsd.sys.mk</a><br> > +++ b/share/mk/<a href=3D"http://bsd.sys.mk" rel=3D"noreferrer" target= =3D"_blank">bsd.sys.mk</a><br> > @@ -86,6 +94,11 @@ CWARNFLAGS.clang+=3D -Wno-unused-const-variable<br> >=C2=A0 =C2=A0.if ${COMPILER_TYPE} =3D=3D "clang" && $= {COMPILER_VERSION} >=3D 130000<br> >=C2=A0 =C2=A0CWARNFLAGS.clang+=3D=C2=A0 -Wno-error=3Dunused-but-set-var= iable<br> >=C2=A0 =C2=A0.endif<br> > +.if ${COMPILER_TYPE} =3D=3D "clang" && ${COMPILER_V= ERSION} >=3D 150000<br> > +CWARNFLAGS.clang+=3D=C2=A0 =C2=A0-Wno-error=3Darray-parameter<br> <br> I've fixed all these that GCC 12 finds.=C2=A0 Do we really need to disa= ble it for clang<br> now after I've pushed those recent fixes?<br></blockquote><div><br></di= v><div>I agree: I don'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't fix that...</div><div><br></div><div>I think I've done a full= bootstrap with clang15 on MacOS since you've imported your</div><div>c= hanges, and I didn'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"> > +CWARNFLAGS.clang+=3D=C2=A0 =C2=A0-Wno-error=3Ddeprecated-non-prototyp= e<br> <br> I'm curious how many places are broken by this and how much it would be= to fix?<br> This is just adding '(void)' in place of '()', 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&R= compilers (I'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'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>