From 2e935f0186169655f422c103d677ad3d878b9eab Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 30 Apr 2001 17:24:00 +0000 Subject: Defeat GCC over-optimization in AC_TRY_LINK tests. --- ChangeLog | 15 ++++++++++----- configure.in | 12 ++++++------ 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index fc92100e7..e866eee98 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,15 +1,20 @@ +2001-04-30 Bart Schaefer + + * 14169: configure.in: Improve some AC_TRY_LINK tests so that they + can't accidentally succeed because of a compiler that optimizes + away unreferenced variables. + 2001-04-30 Sven Wischnowsky - * 14160: Completion/Base/Completer/_expand: fixelt for the test + * 14160: Completion/Base/Completer/_expand: fixlet for the test for the suffix style; if word contains only a tilde, don't try to expand it 2001-04-30 Andrej Borsenkow - * Bart: 14144 (modified): Src/Modules/stat.c - The S_IXUSR, S_IXGRP, S_IXOTH are made external variables in - Cygwin 1.3.1 and cannot be used as static array initializer - anymore. + * Bart: 14144 (modified): Src/Modules/stat.c: The S_IXUSR, + S_IXGRP, S_IXOTH are made external variables in Cygwin 1.3.1 and + cannot be used as static array initializer anymore. 2001-04-29 Bart Schaefer diff --git a/configure.in b/configure.in index 87d787320..4e118de5e 100644 --- a/configure.in +++ b/configure.in @@ -533,36 +533,36 @@ AC_MSG_CHECKING(if boolcodes is available) AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H #include #endif -#include ], [char **test = boolcodes;], +#include ], [char **test = boolcodes; printf(*test);], AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes, boolcodes=no) AC_MSG_RESULT($boolcodes) AC_MSG_CHECKING(if numcodes is available) AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H #include #endif -#include ], [char **test = numcodes;], +#include ], [char **test = numcodes; printf(*test);], AC_DEFINE(HAVE_NUMCODES) numcodes=yes, numcodes=no) AC_MSG_RESULT($numcodes) AC_MSG_CHECKING(if strcodes is available) AC_TRY_LINK([#ifdef TERM_H_NEEDS_CURSES_H #include #endif -#include ], [char **test = strcodes;], +#include ], [char **test = strcodes; printf(*test);], AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no) AC_MSG_RESULT($strcodes) AC_MSG_CHECKING(if boolnames is available) AC_TRY_LINK([#include -#include ], [char **test = boolnames;], +#include ], [char **test = boolnames; printf(*test);], AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no) AC_MSG_RESULT($boolnames) AC_MSG_CHECKING(if numnames is available) AC_TRY_LINK([#include -#include ], [char **test = numnames;], +#include ], [char **test = numnames; printf(*test);], AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no) AC_MSG_RESULT($numnames) AC_MSG_CHECKING(if strnames is available) AC_TRY_LINK([#include -#include ], [char **test = strnames;], +#include ], [char **test = strnames; printf(*test);], AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no) AC_MSG_RESULT($strnames) -- cgit 1.4.1