From: Bruno Haible Date: Thu, 7 May 2026 22:07:30 +0000 (+0200) Subject: build: Silence some warnings from gcc 16. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2958ddd4449476f93cf515abe8f2e6939ef01b4;p=thirdparty%2Fgettext.git build: Silence some warnings from gcc 16. * m4/more-warnings.m4 (gt_MORE_WARNINGS): Don't add the -Wuseless-cast and -Wkeyword-macro options. --- diff --git a/m4/more-warnings.m4 b/m4/more-warnings.m4 index fa2477402..f239a96d5 100644 --- a/m4/more-warnings.m4 +++ b/m4/more-warnings.m4 @@ -1,6 +1,6 @@ # more-warnings.m4 -# serial 5 (gettext-0.25) -dnl Copyright (C) 2023-2025 Free Software Foundation, Inc. +# serial 6 (gettext-1.1) +dnl Copyright (C) 2023-2026 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program @@ -48,6 +48,7 @@ AS_HELP_STRING([[--disable-more-warnings]], [obey exactly the warning options sp dnl First, the warnings that are generated already with -O0: dnl These warnings enforce a certain programming style that is not ours. nw="$nw -Wempty-body" + nw="$nw -Wuseless-cast" nw="$nw -Wvla" dnl All warnings produced by these options (in gcc 13) have been false dnl alarms. @@ -69,6 +70,10 @@ AS_HELP_STRING([[--disable-more-warnings]], [obey exactly the warning options sp dnl We use computed format strings in a number of places, and glibc's dnl does it as well. nw="$nw -Wformat-nonliteral" + dnl Defining a macro with the same name as a keyword is not dangerous; + dnl it merely makes the code a bit harder to understand. Also, older code + dnl is overriding 'alignof' or 'inline' for good reasons. + nw="$nw -Wkeyword-macro" dnl We define a few functions for binary backward compatibility only. dnl These functions are not declared on purpose: So that they cannot be dnl accidentally used in new code.