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
> -static relative_time const RELATIVE_TIME_0;
> +static relative_time const RELATIVE_TIME_0 = { 0, 0, 0, 0, 0, 0, 0 };
> #endif
>
> /* Information passed to and from the parser. */
This patch makes the code less efficient: An allocation of n bytes in the
'data' segment causes n bytes to be read from disk. An allocation of
n bytes in the 'bss' segment does not.
> * lib/getdate.y (RELATIVE_TIME_0): Avoid a stupid 'const object should
> have initializer' warning.
Yes, the warning is stupid, except if you intend to compile the code with
a C++ compiler. But gnulib code is generally not prepared to be compiled
by a C++ compiler. Therefore I would suggest you turn off this type of
warning.
Bruno