From: Richard Henderson <richard.henderson@linaro.org>
To: qemu-devel@nongnu.org
Cc: laurent@vivier.eu
Subject: [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable
Date: Sat, 18 Aug 2018 12:01:10 -0700 [thread overview]
Message-ID: <20180818190118.12911-9-richard.henderson@linaro.org> (raw)
In-Reply-To: <20180818190118.12911-1-richard.henderson@linaro.org>
For the linux-user syscall split, we have static const structs
that must be matched up with a switch statement that uses them.
By default, gcc will not warn for such a variable, but silently
remove them.
For C++, such objects are sometimes declared for their constructor
side effects. Do not propagate this flag into QEM_CXXFLAGS.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
configure | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/configure b/configure
index db97930314..86e6e18428 100755
--- a/configure
+++ b/configure
@@ -105,7 +105,8 @@ update_cxxflags() {
for arg in $QEMU_CFLAGS; do
case $arg in
-Wstrict-prototypes|-Wmissing-prototypes|-Wnested-externs|\
- -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls)
+ -Wold-style-declaration|-Wold-style-definition|-Wredundant-decls|\
+ -Wunused-const-variable)
;;
*)
QEMU_CXXFLAGS=${QEMU_CXXFLAGS:+$QEMU_CXXFLAGS }$arg
@@ -1780,6 +1781,7 @@ gcc_flags="-Wendif-labels -Wno-shift-negative-value $gcc_flags"
gcc_flags="-Wno-initializer-overrides -Wexpansion-to-defined $gcc_flags"
gcc_flags="-Wno-string-plus-int $gcc_flags"
gcc_flags="-Wno-error=address-of-packed-member $gcc_flags"
+gcc_flags="-Wunused-const-variable $gcc_flags"
# Note that we do not add -Werror to gcc_flags here, because that would
# enable it for all configure tests. If a configure test failed due
# to -Werror this would just silently disable some features,
--
2.17.1
next prev parent reply other threads:[~2018-08-18 19:01 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-18 19:01 [Qemu-devel] [PATCH v4 00/16] linux-user: Split do_syscall Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 01/16] linux-user: Remove DEBUG Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 02/16] linux-user: Split out do_syscall1 Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 03/16] linux-user: Relax single exit from "break" Richard Henderson
2018-08-21 18:45 ` Philippe Mathieu-Daudé
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 04/16] linux-user: Propagate goto efault to return Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 05/16] linux-user: Propagate goto unimplemented_nowarn " Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 06/16] linux-user: Propagate goto unimplemented to default Richard Henderson
2018-08-21 16:35 ` Laurent Vivier
2018-08-21 18:45 ` Philippe Mathieu-Daudé
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 07/16] linux-user: Propagate goto fail to return Richard Henderson
2018-08-18 19:01 ` Richard Henderson [this message]
2018-08-21 17:29 ` [Qemu-devel] [PATCH v4 08/16] configure: Use -Wunused-const-variable Laurent Vivier
2018-08-21 17:34 ` Laurent Vivier
2018-08-22 1:06 ` Laurent Vivier
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 09/16] linux-user: Setup split syscall infrastructure Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 10/16] linux-user: Split out some simple file syscalls Richard Henderson
2018-08-22 0:50 ` Laurent Vivier
2018-08-22 22:58 ` Richard Henderson
2018-08-23 15:48 ` Laurent Vivier
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 11/16] linux-user: Split out preadv, pwritev, readv, writev Richard Henderson
2018-08-22 16:03 ` Laurent Vivier
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 12/16] linux-user: Split out pread64, pwrite64 Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 13/16] linux-user: Split out name_to_handle_at, open_by_handle_at Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 14/16] linux-user: Split out ipc syscalls Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 15/16] linux-user: Split out memory syscalls Richard Henderson
2018-08-18 19:01 ` [Qemu-devel] [PATCH v4 16/16] linux-user: Split out some process syscalls Richard Henderson
2018-08-21 17:33 ` [Qemu-devel] [PATCH v4 00/16] linux-user: Split do_syscall Laurent Vivier
2018-08-21 17:36 ` Richard Henderson
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=20180818190118.12911-9-richard.henderson@linaro.org \
--to=richard.henderson@linaro.org \
--cc=laurent@vivier.eu \
--cc=qemu-devel@nongnu.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).