From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29744 invoked by alias); 10 Oct 2009 18:24:07 -0000 Received: (qmail 29731 invoked by uid 22791); 10 Oct 2009 18:24:06 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Oct 2009 18:24:01 +0000 Received: (qmail 22671 invoked from network); 10 Oct 2009 18:24:00 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 10 Oct 2009 18:24:00 -0000 From: Pedro Alves To: gdb@sourceware.org, Eli Zaretskii Subject: Re: A strange gcc behavior, and an argument against -Wno-unused Date: Sat, 10 Oct 2009 18:24:00 -0000 User-Agent: KMail/1.9.10 Cc: dave.korn.cygwin@googlemail.com, msnyder@vmware.com References: <4ACFD8B7.4090902@vmware.com> <200910101745.27358.pedro@codesourcery.com> <83iqenjf1f.fsf@gnu.org> In-Reply-To: <83iqenjf1f.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200910101924.12313.pedro@codesourcery.com> X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2009-10/txt/msg00193.txt.bz2 On Saturday 10 October 2009 19:10:36, Eli Zaretskii wrpte: > What version of GCC introduced this switch? If you're worried about breaking the build with older gcc's, note that gdb/configure.ac filters out -W options that gcc doesn't recognize. if test "x${build_warnings}" != x -a "x$GCC" = xyes then AC_MSG_CHECKING(compiler warning flags) # Separate out the -Werror flag as some files just cannot be # compiled with it enabled. for w in ${build_warnings}; do case $w in -Werr*) WERROR_CFLAGS=-Werror ;; *) # Check that GCC accepts it saved_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $w" AC_TRY_COMPILE([],[],WARN_CFLAGS="${WARN_CFLAGS} $w",) CFLAGS="$saved_CFLAGS" esac done AC_MSG_RESULT(${WARN_CFLAGS} ${WERROR_CFLAGS}) fi That said, I don't know when the switch was introduced in gcc. -- Pedro Alves