[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200817204223.GB12414@amd>
Date: Mon, 17 Aug 2020 22:42:24 +0200
From: Pavel Machek <pavel@....cz>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Michael Witten <mfwitten@...il.com>,
Masahiro Yamada <masahiroy@...nel.org>,
Michal Marek <michal.lkml@...kovi.net>,
Cong Wang <xiyou.wangcong@...il.com>,
Johannes Weiner <hannes@...xchg.org>,
Sam Ravnborg <sam@...nborg.org>, linux-kernel@...r.kernel.org,
linux-kbuild@...r.kernel.org
Subject: Re: [PATCH] Makefile: Yes. Finally remove
'-Wdeclaration-after-statement'
Hi!
> > This is not just a matter of style; this is a matter of semantics,
> > especially with regard to:
> >
> > * const Correctness.
> > A const-declared variable must be initialized when defined.
> >
> > * Conditional Compilation.
> > When there is complex interaction between compile-time
> > configuration options, it's essential to be able to
> > make declarations where needed; otherwise unnecessary
> > gymnastics are required to silence the compiler.
> >
> > Gentleman... Just let people say exactly what they mean to say.
..
> You obviously need every bit of help in that task, judging by the amount
> of clarity (or thoughts, for that matter) visible in the spew above...
>
> NAK. And as for letting people say exactly what they mean to say...
> I am tempted to take you on that invitation, but that would be cruel
> to gregkh - he would have to reply to inevitable screeds about
> CoC-violating postings on l-k.
We should really get rid of CoC, because I'd really like to see you
_not_ resist that temptation.
But... he's right.
With rust-like programming style with widespread consts, this warning
has to go. And it is causing additional/ugly #ifdefs in some cases.
Maybe author can show examples in kernel .c where disabling the
warning would lead to nicer code. I believe we should give it a try.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists