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
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,
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
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) {
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
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
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
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
* 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