Hi Peff & Gábor, On Thu, 25 Jun 2020, Jeff King wrote: > On Thu, Jun 25, 2020 at 10:45:32PM +0200, SZEDER Gábor wrote: > > > > So this really seems like a pointless false positive from the compiler, > > > and it's a rather old compiler (the warning no longer triggers in gcc 6 > > > and up). Is it worth caring about? Ubuntu Trusty is out of standard > > > support but not fully EOL'd until 2022. Debian jessie has gcc 4.9 > > > which triggers the warning, but will hit EOL in 5 days. If it were an > > > actual breakage I'd be more concerned, but keeping such an old compiler > > > -Werror clean doesn't seem that important. > > > > > > I'd note also that none of the Actions CI jobs run with this compiler > > > version. If we _do_ want to care about it, it might be worth covering it > > > there. > > > > C99 style 'for' loop initial declarations are still frowned upon in > > Git's codebase, and as far as we know it GCC 4.8 is the the most > > recent compiler that can reasonably detect it; see fb9d7431cf > > (travis-ci: build with GCC 4.8 as well, 2019-07-18). > > TBH, that does not seem like that compelling a reason to me to keep it > around. If no compiler is complaining of C99 for-loop declarations, then > maybe we should consider loosening our style. Or are we trying to be > kind of some unknown set of platform-specific compilers that we can't > feasibly hit in our CI? FWIW _iff_ we decide to loosen our style, I would like to propose doing it in one place first, and keep it that way for two or three major versions. Traditionally, people stuck on platforms such as IRIX or HP/UX with proprietary C compilers (and remember: I once was one of those people) often lack the luxury of upgrading frequently. And if it turns out that we want to revert the style-loosening, it is much easier to do it in one place than in many. Ciao, Dscho