From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id GRyHNZnR4WpehjwAWB0awg (envelope-from ) for ; Wed, 28 Oct 2026 06:42:33 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D56D1378003; Wed, 28 Oct 2026 06:42:33 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5FD62378002 for ; Wed, 28 Oct 2026 06:42:32 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 931D74BA23CB for ; Wed, 28 Oct 2026 10:42:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 931D74BA23CB Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id EC76E4BA23CE for ; Wed, 28 Oct 2026 10:41:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EC76E4BA23CE Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EC76E4BA23CE Authentication-Results: sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793184072; cv=none; b=GoLATJovm8yycLaE7hEyRXatWSORKPU8FqjfGcyrTplWOTQnq6gXdsShku7V7NfalaVyaOtW1Y56cz0S9RAMsCl1YSLJU616JfGt/lJaKBxylVrmL43qwlI8hkD6TOr3n7VWeIwF1qgm/TSFCEgPXtLDW7RQKSviZbNtpNdimNk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1793184072; c=relaxed/simple; bh=PXGlyU+cbTvWIyX1FlKmI1cCrKqYe5Ql6injvfbH85Y=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-ID:MIME-Version; b=pPkSOvUsUrLp5Sbwekn7wlXLJiPHs/dYGBvfjoDKGE7yOQz7CzFLAFgUPOTJ7IoBb2zu49tIQcXLNcr5EmElq44RvXH1oh4GR0QLGF3HnRZ7el6RWd/XtTq0mk6oZusHE2VPQm+RYhlcHRzZX5t+8tyQoE7EgWE8ixs/7WszPeY= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=0vHCxJiZ; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=JK8AOy3z DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC76E4BA23CE Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1F00B1F820 for ; Wed, 28 Oct 2026 10:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1793184071; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLaVawlZ5344ByxMs/RHZEqaufqMOLQJFJ+SGz+LTFA=; b=0vHCxJiZSQUxqaDmhhAQGe0S89wW++VUs2dGetu6PwEAeD9kSMpxAEiIfElU9vArqFt5tT /hd5UelJUCteJs1RTQyuSqpDOspN+0QoeIJt6ri27Kx0zwHQ0nl/U4Ds8GXo1qlOAVZ27d u7jdvTSXmkBEPbvqoTowa4C0yj9qfRc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1793184071; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLaVawlZ5344ByxMs/RHZEqaufqMOLQJFJ+SGz+LTFA=; b=JK8AOy3zP7u94PhkB4GChgMgJQ8K7VzVb16sFIBz1m3dBlyxUB5xNA6T0nMeodWvcAxxJN 1Wqsarmw3wHqeiBQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1793184071; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLaVawlZ5344ByxMs/RHZEqaufqMOLQJFJ+SGz+LTFA=; b=0vHCxJiZSQUxqaDmhhAQGe0S89wW++VUs2dGetu6PwEAeD9kSMpxAEiIfElU9vArqFt5tT /hd5UelJUCteJs1RTQyuSqpDOspN+0QoeIJt6ri27Kx0zwHQ0nl/U4Ds8GXo1qlOAVZ27d u7jdvTSXmkBEPbvqoTowa4C0yj9qfRc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1793184071; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NLaVawlZ5344ByxMs/RHZEqaufqMOLQJFJ+SGz+LTFA=; b=JK8AOy3zP7u94PhkB4GChgMgJQ8K7VzVb16sFIBz1m3dBlyxUB5xNA6T0nMeodWvcAxxJN 1Wqsarmw3wHqeiBQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E06801342F for ; Wed, 28 Oct 2026 10:41:10 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XKsZHkbR4WrFCQAAD6G6ig:T3 (envelope-from ) for ; Wed, 28 Oct 2026 10:41:10 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH 2/2] [gdb/build] Rework warnings order Date: Wed, 28 Oct 2026 11:41:10 +0100 Message-ID: <20261028104110.1700720-3-tdevries@suse.de> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20261028104110.1700720-1-tdevries@suse.de> References: <20261028104110.1700720-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-11.80 / 50.00]; SUSE_INTERNAL_BYPASS(-9.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_ONE(0.00)[1]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_TLS_ALL(0.00)[] X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org I looked at gdbsupport/warning.m4 and noticed that the warnings list is sorted purely alphabetically, but not on warning name, so Wfoo, Wno-foo and Wno-error=foo are sorted to different locations. I tried out sorting on warning names instead, but then noticed that it's harder to check that the warnings are in the right order. Fix this by introducing two additional lists, build_warnings_no and build_warnings_no_error. Then I noticed that there are two ordering constraints: - Wall needs to be ordered before Wno-char-subscripts and others, and - Wno-unused needs to be ordered before Wunused-variable and others. These constraints were met before commit df3eb64a53c ("gdbsupport: re-format and sort warning flags"). After the commit, they still held but only accidentally, because: - Wall comes first alphabetically, and - Wno-unused comes alphabetically before Wunused-variable. Put differently, if we had applied reverse alphabetical order, both constraints would have been broken. Introduce another list build_warnings_base, and handle these ordering constraints explicitly. --- gdb/configure | 58 ++++++++++++++++++++++++++++++++++++------- gdbserver/configure | 58 ++++++++++++++++++++++++++++++++++++------- gdbsupport/configure | 58 ++++++++++++++++++++++++++++++++++++------- gdbsupport/warning.m4 | 58 ++++++++++++++++++++++++++++++++++++------- 4 files changed, 196 insertions(+), 36 deletions(-) diff --git a/gdb/configure b/gdb/configure index 07bf6edf1d1..b30ab95a551 100755 --- a/gdb/configure +++ b/gdb/configure @@ -31147,9 +31147,24 @@ if test "${ERROR_ON_WARNING}" = yes ; then WERROR_CFLAGS="-Werror" fi -# The options we'll try to enable. -build_warnings=" \ +# The options we'll try to enable. Put options we want to override using +# build_warnings_no here. Sorted alphabetically. +build_warnings_base=" \ -Wall \ +" + +# The options we'll try to disable. Sorted alphabetically. +build_warnings_no=" \ +-Wno-char-subscripts \ +-Wno-mismatched-tags \ +-Wno-sign-compare \ +-Wno-switch \ +-Wno-unused \ +" + +# The options we'll try to enable. Don't put options we want to override +# using build_warnings_no here. Sorted alphabetically. +build_warnings=" \ -Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ @@ -31157,13 +31172,6 @@ build_warnings=" \ -Wempty-body \ -Wimplicit-fallthrough=5 \ -Wmissing-declarations \ --Wno-char-subscripts \ --Wno-error=deprecated-register \ --Wno-error=maybe-uninitialized \ --Wno-mismatched-tags \ --Wno-sign-compare \ --Wno-switch \ --Wno-unused \ -Wpointer-arith \ -Wredundant-move \ -Wshadow=local \ @@ -31184,6 +31192,14 @@ build_warnings=" \ -Wvla \ " +# The warnings which, if enabled, we don't want to turn into errors if -Werror +# is in effect. Note that these neither enable nor disable any warnings. +# Sorted alphabetically. +build_warnings_no_error=" \ +-Wno-error=deprecated-register \ +-Wno-error=maybe-uninitialized \ +" + # The -Wmissing-prototypes flag will be accepted by GCC, but results # in a warning being printed about the flag not being valid for C++, # this is something to do with using ccache, and argument ordering. @@ -31191,6 +31207,30 @@ if test "$GDB_COMPILER_TYPE" != gcc; then build_warnings="$build_warnings -Wmissing-prototypes" fi +# The order here is significant: +# - some warnings are enabled by default +# - build_warnings_base (contains -Wall) enables more warnings +# - build_warnings_no switches some of those off +# - build_warnings enables warnings that were: +# - enabled neither by default nor by build_warnings_base, +# for example -Wshadow=local +# - enabled by default or build_warnings_base but disabled by +# build_warnings_no, for example -Wno-unused and -Wunused-variable +build_warnings=" \ +$build_warnings_base \ +$build_warnings_no \ +$build_warnings \ +" + +# Variable build_warnings_no_error doesn't enable or disable warnings, so the +# concatenation order is not significant. +build_warnings=" \ +$build_warnings \ +$build_warnings_no_error \ +" + +# Host-specific warning settings. Apply these last to make sure they are +# not overridden. case "${host}" in *-*-mingw32*) # Enable -Wno-format by default when using gcc on mingw since many diff --git a/gdbserver/configure b/gdbserver/configure index 725c28e19ad..9bcaba6550a 100755 --- a/gdbserver/configure +++ b/gdbserver/configure @@ -12877,9 +12877,24 @@ if test "${ERROR_ON_WARNING}" = yes ; then WERROR_CFLAGS="-Werror" fi -# The options we'll try to enable. -build_warnings=" \ +# The options we'll try to enable. Put options we want to override using +# build_warnings_no here. Sorted alphabetically. +build_warnings_base=" \ -Wall \ +" + +# The options we'll try to disable. Sorted alphabetically. +build_warnings_no=" \ +-Wno-char-subscripts \ +-Wno-mismatched-tags \ +-Wno-sign-compare \ +-Wno-switch \ +-Wno-unused \ +" + +# The options we'll try to enable. Don't put options we want to override +# using build_warnings_no here. Sorted alphabetically. +build_warnings=" \ -Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ @@ -12887,13 +12902,6 @@ build_warnings=" \ -Wempty-body \ -Wimplicit-fallthrough=5 \ -Wmissing-declarations \ --Wno-char-subscripts \ --Wno-error=deprecated-register \ --Wno-error=maybe-uninitialized \ --Wno-mismatched-tags \ --Wno-sign-compare \ --Wno-switch \ --Wno-unused \ -Wpointer-arith \ -Wredundant-move \ -Wshadow=local \ @@ -12914,6 +12922,14 @@ build_warnings=" \ -Wvla \ " +# The warnings which, if enabled, we don't want to turn into errors if -Werror +# is in effect. Note that these neither enable nor disable any warnings. +# Sorted alphabetically. +build_warnings_no_error=" \ +-Wno-error=deprecated-register \ +-Wno-error=maybe-uninitialized \ +" + # The -Wmissing-prototypes flag will be accepted by GCC, but results # in a warning being printed about the flag not being valid for C++, # this is something to do with using ccache, and argument ordering. @@ -12921,6 +12937,30 @@ if test "$GDB_COMPILER_TYPE" != gcc; then build_warnings="$build_warnings -Wmissing-prototypes" fi +# The order here is significant: +# - some warnings are enabled by default +# - build_warnings_base (contains -Wall) enables more warnings +# - build_warnings_no switches some of those off +# - build_warnings enables warnings that were: +# - enabled neither by default nor by build_warnings_base, +# for example -Wshadow=local +# - enabled by default or build_warnings_base but disabled by +# build_warnings_no, for example -Wno-unused and -Wunused-variable +build_warnings=" \ +$build_warnings_base \ +$build_warnings_no \ +$build_warnings \ +" + +# Variable build_warnings_no_error doesn't enable or disable warnings, so the +# concatenation order is not significant. +build_warnings=" \ +$build_warnings \ +$build_warnings_no_error \ +" + +# Host-specific warning settings. Apply these last to make sure they are +# not overridden. case "${host}" in *-*-mingw32*) # Enable -Wno-format by default when using gcc on mingw since many diff --git a/gdbsupport/configure b/gdbsupport/configure index 31e9732ed1a..b0a879710f2 100755 --- a/gdbsupport/configure +++ b/gdbsupport/configure @@ -13880,9 +13880,24 @@ if test "${ERROR_ON_WARNING}" = yes ; then WERROR_CFLAGS="-Werror" fi -# The options we'll try to enable. -build_warnings=" \ +# The options we'll try to enable. Put options we want to override using +# build_warnings_no here. Sorted alphabetically. +build_warnings_base=" \ -Wall \ +" + +# The options we'll try to disable. Sorted alphabetically. +build_warnings_no=" \ +-Wno-char-subscripts \ +-Wno-mismatched-tags \ +-Wno-sign-compare \ +-Wno-switch \ +-Wno-unused \ +" + +# The options we'll try to enable. Don't put options we want to override +# using build_warnings_no here. Sorted alphabetically. +build_warnings=" \ -Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ @@ -13890,13 +13905,6 @@ build_warnings=" \ -Wempty-body \ -Wimplicit-fallthrough=5 \ -Wmissing-declarations \ --Wno-char-subscripts \ --Wno-error=deprecated-register \ --Wno-error=maybe-uninitialized \ --Wno-mismatched-tags \ --Wno-sign-compare \ --Wno-switch \ --Wno-unused \ -Wpointer-arith \ -Wredundant-move \ -Wshadow=local \ @@ -13917,6 +13925,14 @@ build_warnings=" \ -Wvla \ " +# The warnings which, if enabled, we don't want to turn into errors if -Werror +# is in effect. Note that these neither enable nor disable any warnings. +# Sorted alphabetically. +build_warnings_no_error=" \ +-Wno-error=deprecated-register \ +-Wno-error=maybe-uninitialized \ +" + # The -Wmissing-prototypes flag will be accepted by GCC, but results # in a warning being printed about the flag not being valid for C++, # this is something to do with using ccache, and argument ordering. @@ -13924,6 +13940,30 @@ if test "$GDB_COMPILER_TYPE" != gcc; then build_warnings="$build_warnings -Wmissing-prototypes" fi +# The order here is significant: +# - some warnings are enabled by default +# - build_warnings_base (contains -Wall) enables more warnings +# - build_warnings_no switches some of those off +# - build_warnings enables warnings that were: +# - enabled neither by default nor by build_warnings_base, +# for example -Wshadow=local +# - enabled by default or build_warnings_base but disabled by +# build_warnings_no, for example -Wno-unused and -Wunused-variable +build_warnings=" \ +$build_warnings_base \ +$build_warnings_no \ +$build_warnings \ +" + +# Variable build_warnings_no_error doesn't enable or disable warnings, so the +# concatenation order is not significant. +build_warnings=" \ +$build_warnings \ +$build_warnings_no_error \ +" + +# Host-specific warning settings. Apply these last to make sure they are +# not overridden. case "${host}" in *-*-mingw32*) # Enable -Wno-format by default when using gcc on mingw since many diff --git a/gdbsupport/warning.m4 b/gdbsupport/warning.m4 index 7cae9996765..2eb6e8dc537 100644 --- a/gdbsupport/warning.m4 +++ b/gdbsupport/warning.m4 @@ -35,9 +35,24 @@ if test "${ERROR_ON_WARNING}" = yes ; then WERROR_CFLAGS="-Werror" fi -# The options we'll try to enable. -build_warnings=" \ +# The options we'll try to enable. Put options we want to override using +# build_warnings_no here. Sorted alphabetically. +build_warnings_base=" \ -Wall \ +" + +# The options we'll try to disable. Sorted alphabetically. +build_warnings_no=" \ +-Wno-char-subscripts \ +-Wno-mismatched-tags \ +-Wno-sign-compare \ +-Wno-switch \ +-Wno-unused \ +" + +# The options we'll try to enable. Don't put options we want to override +# using build_warnings_no here. Sorted alphabetically. +build_warnings=" \ -Wdangling-reference \ -Wdeprecated-copy \ -Wdeprecated-copy-dtor \ @@ -45,13 +60,6 @@ build_warnings=" \ -Wempty-body \ -Wimplicit-fallthrough=5 \ -Wmissing-declarations \ --Wno-char-subscripts \ --Wno-error=deprecated-register \ --Wno-error=maybe-uninitialized \ --Wno-mismatched-tags \ --Wno-sign-compare \ --Wno-switch \ --Wno-unused \ -Wpointer-arith \ -Wredundant-move \ -Wshadow=local \ @@ -72,6 +80,14 @@ build_warnings=" \ -Wvla \ " +# The warnings which, if enabled, we don't want to turn into errors if -Werror +# is in effect. Note that these neither enable nor disable any warnings. +# Sorted alphabetically. +build_warnings_no_error=" \ +-Wno-error=deprecated-register \ +-Wno-error=maybe-uninitialized \ +" + # The -Wmissing-prototypes flag will be accepted by GCC, but results # in a warning being printed about the flag not being valid for C++, # this is something to do with using ccache, and argument ordering. @@ -79,6 +95,30 @@ if test "$GDB_COMPILER_TYPE" != gcc; then build_warnings="$build_warnings -Wmissing-prototypes" fi +# The order here is significant: +# - some warnings are enabled by default +# - build_warnings_base (contains -Wall) enables more warnings +# - build_warnings_no switches some of those off +# - build_warnings enables warnings that were: +# - enabled neither by default nor by build_warnings_base, +# for example -Wshadow=local +# - enabled by default or build_warnings_base but disabled by +# build_warnings_no, for example -Wno-unused and -Wunused-variable +build_warnings=" \ +$build_warnings_base \ +$build_warnings_no \ +$build_warnings \ +" + +# Variable build_warnings_no_error doesn't enable or disable warnings, so the +# concatenation order is not significant. +build_warnings=" \ +$build_warnings \ +$build_warnings_no_error \ +" + +# Host-specific warning settings. Apply these last to make sure they are +# not overridden. case "${host}" in *-*-mingw32*) # Enable -Wno-format by default when using gcc on mingw since many -- 2.51.0