From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MEk9N-0002VB-SH for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:17:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MEk9I-0002Tn-H0 for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:17:00 -0400 Received: from [199.232.76.173] (port=55571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MEk9I-0002Tk-AV for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:16:56 -0400 Received: from mx2.redhat.com ([66.187.237.31]:56468) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MEk9H-0003kE-SR for qemu-devel@nongnu.org; Thu, 11 Jun 2009 09:16:56 -0400 Subject: Re: [Qemu-devel] [RFC] Enable Werrror by default From: Mark McLoughlin In-Reply-To: <200906111335.10116.paul@codesourcery.com> References: <200906111335.10116.paul@codesourcery.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 11 Jun 2009 14:14:46 +0100 Message-Id: <1244726086.7752.25.camel@blaa> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Reply-To: Mark McLoughlin List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org 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 l= ocally=20 > for a while now, and it's been extremely useful in picking up dumb erro= rs=20 > (like the recent stellaris_enet.c breakage). >=20 > Any objections? >=20 > You can of course configure with --disable-werror if you really want th= e force=20 > things to build. Based on experiences with other projects: 1) Release tarballs should not ship with -Werror on by default - e.g.=20 new gcc comes along with new warnings and the tarball build fails=20 with no benefit to anyone 2) Anyone submitting patches should build with -Werror and make sure=20 they don't introduce new warnings 3) People with newer gcc are likely to be tripped up by warnings=20 introduced by others with older gcc[1] 4) It's debatable whether builds from git should default to -Werror -=20 on the plus side it helps ensure (2) happens, on the minus side if=20 a warning does sneak in, it makes life a pain for everyone until a=20 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