Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 May 2011 23:38:53 +0000
From:      "Dieter BSD" <dieterbsd@engineer.com>
To:        freebsd-hackers@freebsd.org,freebsd-toolchain@freebsd.org
Subject:   Re: compiler warnings (was: Re: [rfc] a few kern.mk and bsd.sys.mk related changes)
Message-ID:  <20110531233855.95190@gmx.com>

next in thread | raw e-mail | index | archive | help
>> 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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110531233855.95190>