qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Subject: Re: [PATCH v2 3/5] configure: Clean up warning flag lists
Date: Thu, 11 Jun 2020 09:25:40 -0500	[thread overview]
Message-ID: <61557057-f4be-9a74-1422-3dee74be7f03@redhat.com> (raw)
In-Reply-To: <20200610203942.887374-4-richard.henderson@linaro.org>

On 6/10/20 3:39 PM, Richard Henderson wrote:
> Use a helper function to tidy the assembly of gcc_flags.
> Separate flags that disable warnings from those that enable,
> and sort the disable warnings to the end.
> 
> Suggested-by: Eric Blake <eblake@redhat.com>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   configure | 40 ++++++++++++++++++++++++++++++----------
>   1 file changed, 30 insertions(+), 10 deletions(-)
> 

> +# Accumulate -Wfoo and -Wno-bar separately.
> +# We will list all of the enable flags first, and the disable flags second.
> +# Note that we do not add -Werror, because that would enable it for all
> +# configure tests. If a configure test failed due to -Werror this would
> +# just silently disable some features, so it's too error prone.
> +
> +add_to warn_flags -Wold-style-declaration

Hmm - should we add:
warn_flags= nowarn_flags=
prior to this line, to ensure that something inherited from the 
environment doesn't mess us up.

> +add_to warn_flags -Wold-style-definition
> +add_to warn_flags -Wtype-limits
> +add_to warn_flags -Wformat-security
> +add_to warn_flags -Wformat-y2k
> +add_to warn_flags -Winit-self
> +add_to warn_flags -Wignored-qualifiers
> +add_to warn_flags -Wempty-body
> +add_to warn_flags -Wnested-externs
> +add_to warn_flags -Wendif-labels
> +add_to warn_flags -Wno-initializer-overrides

wrong list

> +add_to warn_flags -Wexpansion-to-defined
> +
> +add_to nowarn_flags -Wno-missing-include-dirs
> +add_to nowarn_flags -Wno-shift-negative-value
> +add_to nowarn_flags -Wno-string-plus-int
> +add_to nowarn_flags -Wno-typedef-redefinition
> +
> +gcc_flags="$warn_flags $nowarn_flags"

Otherwise looks sane.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  reply	other threads:[~2020-06-11 14:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-10 20:39 [PATCH v2 0/5] Vs clang-10 and gcc-9 warnings Richard Henderson
2020-06-10 20:39 ` [PATCH v2 1/5] fpu/softfloat: Silence 'bitwise negation of boolean expression' warning Richard Henderson
2020-06-10 20:39 ` [PATCH v2 2/5] migration: fix xbzrle encoding rate calculation Richard Henderson
2020-06-10 20:39 ` [PATCH v2 3/5] configure: Clean up warning flag lists Richard Henderson
2020-06-11 14:25   ` Eric Blake [this message]
2020-06-17  1:29     ` Richard Henderson
2020-06-10 20:39 ` [PATCH v2 4/5] configure: Disable -Wtautological-type-limit-compare Richard Henderson
2020-06-10 20:39 ` [PATCH v2 5/5] configure: Add -Wno-psabi Richard Henderson
2020-06-11 16:44   ` Alex Bennée
2020-06-11 16:57     ` Richard Henderson
2020-06-11 17:17       ` Alex Bennée
2020-06-11 17:49         ` Richard Henderson
2020-06-12  6:42           ` Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=61557057-f4be-9a74-1422-3dee74be7f03@redhat.com \
    --to=eblake@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).