Andreas Schwab <[EMAIL PROTECTED]> wrote: > The gl_C_COMPOUND_LITERALS test can never succeed, since the test > program is invalid C. A compound literal is never a constant > expression, thus cannot be used to initialize a static variable.
Hi Andreas, Thanks for the patch. It looks fine. However, note that the test does succeed with gcc and -std=c89 or -std=gnu89, so we'll have to adjust the ChangeLog entry. > 2008-06-24 Andreas Schwab <[EMAIL PROTECTED]> > > * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Remove invalid > initializer that causes the test to always fail. > > diff --git a/m4/getdate.m4 b/m4/getdate.m4 > index d160329..20382ec 100644 > --- a/m4/getdate.m4 > +++ b/m4/getdate.m4 > @@ -7,7 +7,7 @@ > AC_DEFUN([gl_C_COMPOUND_LITERALS], > [ > AC_CACHE_CHECK([for compound literals], gl_cv_compound_literals, > - [AC_TRY_COMPILE([struct s { int i, j; }; struct s s = (struct s) { 1, 2 > };], > + [AC_TRY_COMPILE([struct s { int i, j; };], > [struct s t = (struct s) { 3, 4 }; > if (t.i != 0) return 0;], > gl_cv_compound_literals=yes,