Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-30 Thread Bruno Haible
Paolo Bonzini wrote: > Recent and not-so-recent GCC (the behavior was introduced in 3.3) put a > zero initializer in bss. You're right. I was assuming a traditional, "dumb" compiler. So, I withdraw my objection. Bruno

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-30 Thread Paolo Bonzini
On 04/28/2010 12:00 AM, Bruno Haible wrote: Andreas Gruenbacher wrote: diff --git a/lib/getdate.y b/lib/getdate.y index 445865b..dcfe3cc 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -152,7 +152,7 @@ typedef struct #if HAVE_COMPOUND_LITERALS # define RELATIVE_TIME_0 ((relative_time) { 0,

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-28 Thread Bruno Haible
Simon Josefsson wrote: > Isn't > > static relative_time const RELATIVE_TIME_0 = { }; > > equivalent too? I find that is a nice idiom. This syntax is not portable. Sun C, for example, does not like it: $ cat foo.c typedef struct { /* Relative year, month, day, hour, minutes, seconds, and nano

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-28 Thread Simon Josefsson
Eric Blake writes: > On 04/27/2010 03:24 PM, Andreas Gruenbacher wrote: >> * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should >> have initializer' warning. >> >> @@ -152,7 +152,7 @@ typedef struct >> #if HAVE_COMPOUND_LITERALS >> # define RELATIVE_TIME_0 ((relative_time) {

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
On Wednesday 28 April 2010 00:00:35 Bruno Haible wrote: > Andreas Gruenbacher wrote: > > diff --git a/lib/getdate.y b/lib/getdate.y > > index 445865b..dcfe3cc 100644 > > --- a/lib/getdate.y > > +++ b/lib/getdate.y > > @@ -152,7 +152,7 @@ typedef struct > > #if HAVE_COMPOUND_LITERALS > > # define

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
On Tuesday 27 April 2010 23:42:07 Eric Blake wrote: > On 04/27/2010 03:24 PM, Andreas Gruenbacher wrote: > > * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should > > have initializer' warning. > > > > @@ -152,7 +152,7 @@ typedef struct > > #if HAVE_COMPOUND_LITERALS > > # define

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Bruno Haible
Andreas Gruenbacher wrote: > diff --git a/lib/getdate.y b/lib/getdate.y > index 445865b..dcfe3cc 100644 > --- a/lib/getdate.y > +++ b/lib/getdate.y > @@ -152,7 +152,7 @@ typedef struct > #if HAVE_COMPOUND_LITERALS > # define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) > #else > -st

Re: [PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Eric Blake
On 04/27/2010 03:24 PM, Andreas Gruenbacher wrote: > * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should > have initializer' warning. > > @@ -152,7 +152,7 @@ typedef struct > #if HAVE_COMPOUND_LITERALS > # define RELATIVE_TIME_0 ((relative_time) { 0, 0, 0, 0, 0, 0, 0 }) > #el

[PATCH 3/4] Avoid a stupid 'const object should have initializer' warning

2010-04-27 Thread Andreas Gruenbacher
* lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should have initializer' warning. Signed-off-by: Andreas Gruenbacher --- ChangeLog |3 +++ lib/getdate.y |2 +- 2 files changed, 4 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6743cce..3ed5687