From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEkQP-0005Ce-GY for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:34:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEkQK-0005A6-3k for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:34:36 -0400 Received: from [199.232.76.173] (port=47872 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEkQJ-0005A3-Uq for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:34:31 -0400 Received: from wa4ehsobe002.messaging.microsoft.com ([216.32.181.12]:3303 helo=WA4EHSOBE002.bigfish.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_ARCFOUR_MD5:16) (Exim 4.60) (envelope-from ) id 1MEkQJ-00028y-J1 for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:34:31 -0400 From: Christoph Egger Subject: Re: [Qemu-devel] [RFC] Enable Werrror by default Date: Thu, 11 Jun 2009 15:34:18 +0200 References: <200906111335.10116.paul@codesourcery.com> <1244726086.7752.25.camel@blaa> In-Reply-To: <1244726086.7752.25.camel@blaa> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-ID: <200906111534.18586.Christoph.Egger@amd.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Mark McLoughlin Cc: Paul Brook On Thursday 11 June 2009 15:14:46 Mark McLoughlin wrote: > On Thu, 2009-06-11 at 13:35 +0100, Paul Brook wrote: > > I'd like to enable Werror by default. I've been using --enable-werror > > locally for a while now, and it's been extremely useful in picking up > > dumb errors (like the recent stellaris_enet.c breakage). > > > > Any objections? > > > > You can of course configure with --disable-werror if you really want the > > force things to build. > > Based on experiences with other projects: > > 1) Release tarballs should not ship with -Werror on by default - e.g. > new gcc comes along with new warnings and the tarball build fails > with no benefit to anyone > > 2) Anyone submitting patches should build with -Werror and make sure > they don't introduce new warnings Newer gcc enable warnings by default older versions already have as well. > 3) People with newer gcc are likely to be tripped up by warnings > introduced by others with older gcc[1] > > 4) It's debatable whether builds from git should default to -Werror - > on the plus side it helps ensure (2) happens, on the minus side if > a warning does sneak in, it makes life a pain for everyone until a > fix gets applied > > IMHO, we should enable it by default for git builds. > > Cheers, > Mark. > > [1] e.g. with gcc-4.4.0, but not with gcc-4.3.2: > > hw/virtio-blk.c:302: warning: =E2=80=98blkcfg.size_max=E2=80=99 is used= uninitialized in > this function You should see the same warning with gcc 4.3.2 -Wuninitialized , too. Christoph =2D-=20 =2D--to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632