Subject: Re: Removing -Wdeclaration-after-statement

From: Junio C Hamano <[email-masked]>
Date: Wed, 08 Dec 2021 09:05:11 -0800

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> Why would that be sad? The intent of -Wdeclaration-after-statement is to
> catch C90 compatibility issues. Maybe we don't want to enable everything
> C99-related in this area at once, but why shouldn't we be removing
> -Wdeclaration-after-statement once we have a hard C99 dependency?

We already heard from people that we do not want vla, and I agree
that we do not want all C99.  decl-after-stmt is something I
definitely do not want in our code, in order to keep the code more
readable by declaring the things that will be used in the scope
upfront, with documentation if needed.  It tends to encourage us to
keep our blocks smaller.