* m4/builtin-expect.m4 (gl___BUILTIN_EXPECT): * m4/iconv.m4 (AM_ICONV_LINK, AM_ICONV): Avoid whitespace at line end in C code. * modules/unitypes-h (unitypes_restrict): Likewise, bearing in mind that configure.ac lines will be indented so such lines containing only '])' should be avoided when they generate C code. --- ChangeLog | 9 +++++++++ m4/builtin-expect.m4 | 5 ++--- m4/iconv.m4 | 11 ++++------- modules/unitypes-h | 3 +-- 4 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 1ff4dceb23..6da050ff2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2025-04-17 Paul Eggert <egg...@cs.ucla.edu> + Pacify GCC 15’s new -Wtrailing-whitespace option + * m4/builtin-expect.m4 (gl___BUILTIN_EXPECT): + * m4/iconv.m4 (AM_ICONV_LINK, AM_ICONV): + Avoid whitespace at line end in C code. + * modules/unitypes-h (unitypes_restrict): + Likewise, bearing in mind that configure.ac lines will be indented + so such lines containing only '])' should be avoided when they + generate C code. + manywarnings: update C warnings for GCC 15 Adjust for C programs compiled by GCC 15. This is merely changes to commentary; no changes to diff --git a/m4/builtin-expect.m4 b/m4/builtin-expect.m4 index 2c2fab4bb6..76d3286788 100644 --- a/m4/builtin-expect.m4 +++ b/m4/builtin-expect.m4 @@ -1,5 +1,5 @@ # builtin-expect.m4 -# serial 2 +# serial 3 dnl Copyright 2016-2025 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -48,5 +48,4 @@ AC_DEFUN([gl___BUILTIN_EXPECT] #elif HAVE___BUILTIN_EXPECT == 2 # include <builtins.h> #endif - ]) -]) +])]) diff --git a/m4/iconv.m4 b/m4/iconv.m4 index 9af06c4399..09ab1dc825 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,5 +1,5 @@ # iconv.m4 -# serial 28 +# serial 29 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2025 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -82,7 +82,7 @@ AC_DEFUN([AM_ICONV_LINK] LIBS="$LIBS $LIBICONV" fi am_cv_func_iconv_works=no - for ac_iconv_const in '' 'const'; do + for ac_iconv_const in '/*empty*/' 'const'; do AC_RUN_IFELSE( [AC_LANG_PROGRAM( [[ @@ -292,7 +292,7 @@ AC_DEFUN_ONCE([AM_ICONV] gl_cv_iconv_nonconst=yes fi if test $gl_cv_iconv_nonconst = yes; then - iconv_arg1="" + iconv_arg1="/*empty*/" else iconv_arg1="const" fi @@ -301,10 +301,7 @@ AC_DEFUN_ONCE([AM_ICONV] dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. m4_ifdef([gl_ICONV_H_DEFAULTS], [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) - if test $gl_cv_iconv_nonconst != yes; then - ICONV_CONST="const" - fi - ]) + ICONV_CONST=$iconv_arg1]) dnl A summary result, for those packages which want to print a summary at the dnl end of the configuration. diff --git a/modules/unitypes-h b/modules/unitypes-h index faf0d89b6c..b512947c73 100644 --- a/modules/unitypes-h +++ b/modules/unitypes-h @@ -26,8 +26,7 @@ AH_VERBATIM([unitypes_restrict], [ # define _UC_RESTRICT restrict # else # define _UC_RESTRICT -# endif -]) +# endif]) Makefile.am: BUILT_SOURCES += $(LIBUNISTRING_UNITYPES_H) -- 2.49.0