Re: [PATCH] dir.c: avoid c99 array initialization
- From
Andreas Ericsson <ae@op5.se>
- Date
- Aug 28, 2008, 15:41 UTC
- Message-ID
- <48B6C715.9060603@op5.se>
- In-Reply-To
- <871w09kvew.fsf@lysator.liu.se>
David Kågedal wrote:
Show 16 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> writes:
>
>> The following syntax:
>>
>> char foo[] = {
>> [0] = 1,
>> [7] = 2,
>> [15] = 3
>> };
>>
>> is a c99 construct which some compilers do not support even though they
>> support other c99 constructs. Use an alternative.
>
> But the alternative is much worse. So how important is it to support
> non-C99 compilers?
> Fairly important. Lots of people have gone through lots of work to make sure git works with legacy compilers.
-- Andreas Ericsson andreas.ericsson@op5.se OP5 AB www.op5.se Tel: +46 8-230225 Fax: +46 8-230231