[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: canon-host.c disagreement (gnulib vs coreutils); zero initializers
From: |
Jim Meyering |
Subject: |
Re: canon-host.c disagreement (gnulib vs coreutils); zero initializers |
Date: |
Fri, 24 Jun 2005 13:37:21 +0200 |
Simon Josefsson <address@hidden> wrote:
> Paul Eggert <address@hidden> writes:
>
>> The extra comma is an indication to the reader that we know there are
>> missing zeros, and don't care. This style can be used for any object
>> in C89, e.g.:
>>
>> mbstate_t initial_state = { 0, };
>>
>> where we don't know whether mbstate_t is a structure, or an integer,
>> and the code works either way.
>
> I recall some compilers complaining about a trailing ','s. Is it
> really OK by C89? I'm just curious.
SunOS's /bin/cc was one of the complainers,
but we've all agreed to drop support for it.