]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Dec 2011 06:41:04 +0000 (22:41 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Dec 2011 06:41:36 +0000 (22:41 -0800)
* lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the
array as well as setting it, to pacify g++.  Reported by
Werner Lemberg in
<http://lists.gnu.org/archive/html/autoconf/2011-12/msg00005.html>.

ChangeLog
lib/autoconf/c.m4

index f9f4b907d636c7c880bcc51680ef7818a657c6fa..0f67f89071fda8fb56e9a8b36a074cfc6045df5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       AC_LANG_BOOL_COMPILE_TRY(C): port to g++ with warnings
+       * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY(C)): Use the
+       array as well as setting it, to pacify g++.  Reported by
+       Werner Lemberg in
+       <http://lists.gnu.org/archive/html/autoconf/2011-12/msg00005.html>.
+
 2011-12-05  Paul Eggert  <eggert@cs.ucla.edu>
 
        doc: document GNU make's \#
index 88785d1e51c728235b470452ee6016a08a1da0af..0fdf9dd52522754c699d5441e603099b7d039da8 100644 (file)
@@ -190,7 +190,8 @@ choke me
 # errors with `-W error'.
 m4_define([AC_LANG_BOOL_COMPILE_TRY(C)],
 [AC_LANG_PROGRAM([$1], [static int test_array @<:@1 - 2 * !($2)@:>@;
-test_array @<:@0@:>@ = 0
+test_array @<:@0@:>@ = 0;
+return test_array @<:@0@:>@;
 ])])