Re: [PATCH] strbuf: use designated initializers in STRBUF_INIT
- From
Stefan Beller <sbeller@google.com>
- Date
- Jul 10, 2017, 17:33 UTC
- Message-ID
- <CAGZ79kbbqj++1HZVY3gBaghn+knWa+cAgwWUw9Z+zdNkjQHCWg@mail.gmail.com>
- In-Reply-To
- <xmqqr2xo6y2s.fsf@gitster.mtv.corp.google.com>
On Mon, Jul 10, 2017 at 9:44 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 16 quoted lines
> Jeff King <peff@peff.net> writes:
>
>>> That way, we will see if there are people who need pre-C99 soon
>>> enough, and we won't have to scramble reverting too many changes
>>> when it happens.
>>
>> Neat idea. Something like this?
>
> Yes, your log message said everything I wanted to say, including
> possiblity that some compilers may have specific features without
> supporting all of c99.
>
> We accidentally started using "trailing comma at the end of enum
> definition is allowed in c99", and we know it has been safe at least
> for a cycle. Credits goes to Brandon for 4538eef5 ("grep: add
> submodules as a grep source type", 2016-12-16).Credit goes to Brandon for spotting it, but the introduction of "trailing comma at the end of enum definition is allowed in c99" is e1327023ea (grep: refactor the concept of "grep source" into an object, 2012-02-02) IMHO, which is more time that proved this feature being supported on all compilers.
Thanks for getting the ball rolling, just wondering if the patch needs a comment in the code. The commit message is very thorough though.
Thanks, Stefan