Paul Eggert <[EMAIL PROTECTED]> writes:
> Simon Josefsson <[EMAIL PROTECTED]> writes:
>
>> I recall some compilers complaining about a trailing ','s. Is it
>> really OK by C89? I'm just curious.
>
> Yes, it is allowed in C89.
>
> Perhaps you're thinking of enumeration specifiers. The declaratio
Simon Josefsson <[EMAIL PROTECTED]> writes:
> I recall some compilers complaining about a trailing ','s. Is it
> really OK by C89? I'm just curious.
Yes, it is allowed in C89.
Perhaps you're thinking of enumeration specifiers. The declaration:
enum { zero, };
is not allowed in C89. (C99 al
On Fri, Jun 24, 2005 at 01:16:50PM +0200, Simon Josefsson wrote:
> I recall some compilers complaining about a trailing ','s. Is it
> really OK by C89? I'm just curious.
Oddly, it's different for array initialisers and enums, but I can't
remember which is allowed and which is not.
James.
_
Simon Josefsson <[EMAIL PROTECTED]> wrote:
> Paul Eggert <[EMAIL PROTECTED]> 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, };
>>
>>
Paul Eggert <[EMAIL PROTECTED]> 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
Paul Eggert <[EMAIL PROTECTED]> wrote:
> I noticed the following disagreement between gnulib and coreutils:
>
> --- gnulib/lib/canon-host.c 2005-05-13 23:03:57 -0700
> +++ cu/lib/canon-host.c 2005-05-14 00:58:06 -0700
...
> I assume that this was due to a warning from "gcc -W" about a missi
I noticed the following disagreement between gnulib and coreutils:
--- gnulib/lib/canon-host.c 2005-05-13 23:03:57 -0700
+++ cu/lib/canon-host.c 2005-05-14 00:58:06 -0700
@@ -54,8 +54,9 @@ canon_host (char const *host)
#if HAVE_GETADDRINFO
{
-struct addrinfo hint = { 0 };
+struct