From owner-freebsd-toolchain@FreeBSD.ORG Tue May 31 23:39:16 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB6E91065673 for ; Tue, 31 May 2011 23:39:16 +0000 (UTC) (envelope-from dieterbsd@engineer.com) Received: from mailout-us.gmx.com (mailout-us.gmx.com [74.208.5.67]) by mx1.freebsd.org (Postfix) with SMTP id 9377B8FC1D for ; Tue, 31 May 2011 23:39:16 +0000 (UTC) Received: (qmail 28635 invoked by uid 0); 31 May 2011 23:38:57 -0000 Received: from 67.206.163.29 by rms-us007.v300.gmx.net with HTTP Content-Type: text/plain; charset="utf-8" Date: Tue, 31 May 2011 23:38:53 +0000 From: "Dieter BSD" Message-ID: <20110531233855.95190@gmx.com> MIME-Version: 1.0 To: freebsd-hackers@freebsd.org,freebsd-toolchain@freebsd.org X-Authenticated: #74169980 X-Flags: 0001 X-Mailer: GMX.com Web Mailer x-registered: 0 Content-Transfer-Encoding: 8bit X-GMX-UID: ag2MIl0dlTXuAivrAW5lMhRjaGRhZlq2 Cc: Subject: Re: compiler warnings (was: Re: [rfc] a few kern.mk and bsd.sys.mk related changes) X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 23:39:17 -0000 >> please keep in mind that -Wfoo does reflect the ideas of the GNU people >> regarding *proper* code. the warnings themselves are sometimes wrong, >> because they complain about perfectly correct code. I attempted to get the gcc people to improve this: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9072 Most of the warnings I see are either due to someone thinking all the world is ILP32 and doing things like storing a 64 bit pointer or long in a 32 bit int, or due to the compiler needing more info to insure that they are not trying to stuff 64 bits into 32, such as missing prototypes.  Either way it needs to be fixed. In many cases the developers that claim to write such great code, and claim that the compiler warnings don't matter are the ones whose code has the most bugs (seg faults, floating point exceptions, ...). > Pretty much the entire kernel is compiled > with quite a large number of warning classes enabled, and -Werror set, for > example. Whoever did this, THANK YOU!!! > fixing warnings in other people's code is useful only if > you can get them to accept the fixes back Fixing bugs is always useful.  Certainly it is a *lot* more efficient if you can get them fixed at the source rather than having to maintain patches.