From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvtGZ-00024q-25 for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:56:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SvtGT-0004dT-Bv for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:56:22 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:34310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SvtGT-0004c1-5a for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:56:17 -0400 Message-ID: <5016BCAE.6040302@weilnetz.de> Date: Mon, 30 Jul 2012 18:56:14 +0200 From: Stefan Weil MIME-Version: 1.0 References: <25942a670d12b1fd431e5a0d498ff50cef80433e.1343664167.git.blauwirbel@gmail.com> In-Reply-To: <25942a670d12b1fd431e5a0d498ff50cef80433e.1343664167.git.blauwirbel@gmail.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 5/5] configure: disable a few Clang compiler warnings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: blauwirbel@gmail.com Cc: qemu-devel@nongnu.org Am 30.07.2012 18:04, schrieb blauwirbel@gmail.com: > From: Blue Swirl > > Clang compiler warns about a few constructs in QEMU code. It's possible > to avoid those but that needs more work. > > Suppress some warnings for Clang compiler. -Wno-unused-value would > conflict with GCC. > > Signed-off-by: Blue Swirl > --- > configure | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/configure b/configure > index c65b5f6..e32f188 100755 > --- a/configure > +++ b/configure > @@ -1154,17 +1154,20 @@ if test -z "$werror" ; then > fi > fi > > +# GCC flags > gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits" > gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags" > gcc_flags="-Wmissing-include-dirs -Wempty-body -Wnested-externs $gcc_flags" > gcc_flags="-fstack-protector-all -Wendif-labels $gcc_flags" > +# Clang flags > +clang_flags="-Wno-initializer-overrides -Wno-self-assign -Wno-constant-conversion" I'd prefer getting these warnings (and not having them disabled) for compilations without -Werror ("$werror" = "no"). Regards, Stefan W. > > if test "$werror" = "yes" ; then > gcc_flags="-Werror $gcc_flags" > fi > cat > $TMPC << EOF > int main(void) { return 0; } > EOF > -for flag in $gcc_flags; do > +for flag in $gcc_flags $clang_flags; do > if compile_prog "-Werror $flag" "" ; then > QEMU_CFLAGS="$QEMU_CFLAGS $flag" > fi