Date: Tue, 31 May 2011 11:16:47 +0000 From: Alexander Best <arundel@freebsd.org> To: Dieter BSD <dieterbsd@engineer.com> Cc: 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: <20110531111647.GA7168@freebsd.org> In-Reply-To: <20110530224357.95220@gmx.com> References: <20110530224357.95220@gmx.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon May 30 11, Dieter BSD wrote: > Chris writes: > >> Ports need attention. The warnings I get there are frightening. > > > > I find it comforting that they're just that: warnings. > > > > How do they frighten you? > > High quality code does not have any warnings. > > The most frightening thing is the attitute that "They're just warnings, > so I'll ignore them." Most compiler warnings should be fatal errors. > And a lot of the warnings that require a -Wwhatever should be on by > default. 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. so -Wfoo should not be considered a code verifier, but in fact what it is: a warning flag. sometimes it's correct and indeed reports wrong code, sometimes it is completely wrong. cheers. alex > > Code that doesn't compile cleanly often has other problems, like assuming > that all CPUs are ILP32 little endian, like not checking return codes, etc. > > But hey, the next time the weather service issues a tornado warning, > feel free to go outside and fly a kite. After all it's just a warning. > > a13x writes: > > -Wcoercion seems to have only been a SoC project in 2006 [1]. i checked gcc > > trunk and it's not in the gcc(1) manual. > > > > [1] http://gcc.gnu.org/wiki/Wcoercion > > And yet someone marked the bug fixed. > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9072 -- a13x
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110531111647.GA7168>