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.

Andreas.

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,

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Reply via email to