Bryan Turner <bturner@xxxxxxxxxxxxx> writes: > On Tue, Jul 16, 2019 at 10:21 AM Junio C Hamano <gitster@xxxxxxxxx> wrote: >> >> Even though we have been sticking to C89, there are a few handy >> features we borrow from more recent C language in our codebase after >> trying them in weather balloons and saw that nobody screamed. >> >> Spell them out. >> >> While at it, extend the existing variable declaration rule a bit to >> read better with the newly spelled out rule for the for loop. >> >> Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx> >> --- >> Documentation/CodingGuidelines | 20 +++++++++++++++++--- >> 1 file changed, 17 insertions(+), 3 deletions(-) >> >> diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines >> index 1169ff6c8e..53903b14c8 100644 >> --- a/Documentation/CodingGuidelines >> +++ b/Documentation/CodingGuidelines >> @@ -195,10 +195,24 @@ For C programs: >> by e.g. "echo DEVELOPER=1 >>config.mak". >> >> - We try to support a wide range of C compilers to compile Git with, >> - including old ones. That means that you should not use C99 >> - initializers, even if a lot of compilers grok it. >> + including old ones. That means that you should not use certain C99 >> + features, even if your compiler groks it. There are a few >> + exceptions: >> >> + . since early 2012 with e1327023ea, we have been using an enum >> + definition whose last element is followed by a comma. > > Is there a significance to the leading . here versus a leading - below? Absolutely. - Item 1's description - Item 2's description . subitem a of 2 . subitem b of 2 These two subitems are exceptions. - Item 3's description was what I meant.