From: Akim Demaille Date: Wed, 5 Sep 2001 08:46:53 +0000 (+0000) Subject: * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_' X-Git-Tag: AUTOCONF-2.52f~165 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=503e11606c2c95e06e0a2c2e9e0e7ea5f62b9fb1;p=thirdparty%2Fautoconf.git * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_' to avoid GCC warnings. From Uwe Seimet. --- diff --git a/ChangeLog b/ChangeLog index 6b909cbfb..06c09a757 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-09-05 Akim Demaille + + * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use `_array_' + to avoid GCC warnings. + From Uwe Seimet. + 2001-09-05 Akim Demaille * bin/autom4te.in: --language is -l, not -s. diff --git a/THANKS b/THANKS index de55ddd17..7aa996c54 100644 --- a/THANKS +++ b/THANKS @@ -155,6 +155,7 @@ Tom Purcell Tom.Purcell@wang.com Tom Tromey tromey@cygnus.com Tom Yu tlyu@mit.edu Tony Leneis tony@plaza.ds.adp.com +Uwe Seimet us@orbacus.com Viktor Dukhovni viktor@anaheim.esm.com Volker Borchert bt@teknon.de Werner Lemberg wl@gnu.org diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index e908d005a..5bdeddeca 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -194,8 +194,12 @@ f = $1; # AC_LANG_BOOL_COMPILE_TRY(C)(PROLOGUE, EXPRESSION) # ------------------------------------------------- +# Be sure to use this array to avoid `unused' warnings, which are even +# errors with `-W error'. m4_define([AC_LANG_BOOL_COMPILE_TRY(C)], -[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@])]) +[AC_LANG_PROGRAM([$1], [int _array_ @<:@1 - 2 * !($2)@:>@; +_array_ @<:@0@:>@ = 0 +])]) # AC_LANG_INT_SAVE(C)(PROLOGUE, EXPRESSION)