[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bogus gl_C_COMPOUND_LITERALS test
From: |
Andreas Schwab |
Subject: |
Bogus gl_C_COMPOUND_LITERALS test |
Date: |
Tue, 24 Jun 2008 14:58:20 +0200 |
User-agent: |
Gnus/5.110009 (No Gnus v0.9) Emacs/22.2 (gnu/linux) |
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 <address@hidden>
* 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, address@hidden
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."
- Bogus gl_C_COMPOUND_LITERALS test,
Andreas Schwab <=