From b854606885ca849e0b5a1488b6dc82105d3c138d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 7 Dec 2011 22:41:04 -0800 Subject: [PATCH] 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 . --- ChangeLog | 8 ++++++++ lib/autoconf/c.m4 | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f9f4b907..0f67f890 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-12-07 Paul Eggert + + 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 + . + 2011-12-05 Paul Eggert doc: document GNU make's \# diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4 index 88785d1e..0fdf9dd5 100644 --- a/lib/autoconf/c.m4 +++ b/lib/autoconf/c.m4 @@ -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@:>@; ])]) -- 2.47.2