Re: [PATCH] Makefile: Yes. Finally remove '-Wdeclaration-after-statement'

From: Pavel Machek
Date: Mon Aug 17 2020 - 16:42:27 EST


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

Attachment: signature.asc
Description: Digital signature