From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3696 invoked by alias); 15 Jan 2006 17:56:11 -0000 Received: (qmail 3686 invoked by uid 22791); 15 Jan 2006 17:56:11 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 15 Jan 2006 17:56:09 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k0FHtTet010935; Sun, 15 Jan 2006 18:55:29 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k0FHtSlC021055; Sun, 15 Jan 2006 18:55:29 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k0FHtSR9016305; Sun, 15 Jan 2006 18:55:28 +0100 (CET) Date: Sun, 15 Jan 2006 17:56:00 -0000 Message-Id: <200601151755.k0FHtSR9016305@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060115170103.GA5830@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 15 Jan 2006 12:01:03 -0500) Subject: Re: [RFA] Turn on -Werror by default References: <200601081759.k08HxOxP007121@elgar.sibelius.xs4all.nl> <20060108222546.GA4147@nevyn.them.org> <200601082253.k08MrLY1000252@elgar.sibelius.xs4all.nl> <20060115170103.GA5830@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00169.txt.bz2 > Date: Sun, 15 Jan 2006 12:01:03 -0500 > From: Daniel Jacobowitz > > On Sun, Jan 08, 2006 at 11:53:21PM +0100, Mark Kettenis wrote: > > Sorry, but I think we've waited long enough. GCC 4 has been out for 9 > > months now, so people have had plenty of time to fix issues with it. > > In fact, I think people have largely ignored its problems because we > > don't enable -Werror by default. I bet enabling it, will make people > > actually fix the problems. > > What version of GCC are you using? The first of 189 GCC 4 warnings in > my builds comes from source.c (and is a little non-obvious to fix, I'm > working on it). Exactly one warning is in Linux-specific code. OpenBSD comes with GCC 3.3.5 or GCC 2.95.3, so that's what I use to test all the OpenBSD targets. FreeBSD and NetBSD still ship with GCC 3.4.x, even in -CURRENT, wo that's what I use for testing those targets. Solaris 10 has GCC 3.4.2. Even most Linux systems out there will still use GCC 3. At work the first machine with SuSE 10 cam in a week ago (and we get new machines every couple of months or so). All older machines still have GCC 3. >From time to time I play with GCC 4, and try to fix a few problems, but I get the feeling I'm the only one. The source.c warning has to do with line numbers isn't it? I spent some time on tracking that down too. Simply changing signed integers into unsigned integers makes the compiler happy, but results in GDB being broken. This fact alone should make clear that there are cases where these new warnings are actually useful. > I definitely object if you're going to check in a patch that makes GDB > build nowhere by default. I'm certainly not proposing to do that; even with -Werror enabled, GDB builds fine on most systems. And when we enable -Werror, we should seriously consider turning it off again before release. > > If you're talking about Linux builds that fall over with -Werror even > > with older GCC versions, then there is no real excuse. GDB > > maintainers should have been compiling with -Werror for at least the > > past four years. > > FYI, most of the -Werror problems in Linux builds with older compilers > are specifically fallout of fixes for the stupid GCC 4 warnings. It > _used_ to build with -Werror until mass interface changes started > breaking it. There certainly has been some fallout, and a significant amount off my commits since April have been devoted to fixing those. It usually is just a few minutes to fix them. Unfortunately I don't own any arm hardware, so I don't regularly compile things for arm. However, over the past few months I've fixed more than a few problems that were introduced by people contributing new code. They clearly are not using -Werror, and therefore losing a valuable tool to catch bugs. Mark