Date: Tue, 18 Oct 2011 00:28:42 +0200 From: Matthias Andree <mandree@FreeBSD.org> To: freebsd-toolchain@freebsd.org Subject: Re: disable -Wtautological-compare for clang Message-ID: <4E9CAC1A.5040709@FreeBSD.org> In-Reply-To: <20111017152548.GA66978@freebsd.org> References: <20111017152548.GA66978@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Am 17.10.2011 17:25, schrieb Alexander Best: > any chance we could disable -Wtautological-compare for clang? i don't think > comparing an unsigned int against < 0 is worth a warning. actually it's always > nice to have such a seatbelt, in case somebody changes the type to int and > forgets to introduce such a check. If your code must be unclean in such a way that it uses deliberately dead code "just in case someone breaks the semantics", can you not use -Wno-tautological-compare in that situation? Unless someone goes to paranoia mode and sprays unneeded checks like you suggest all over the code like an ugly graffity, all such warnings are worth investigating. In code I've hand my eyes and/or hands on, the better part of these warnings were pointing to true bugs. So, objection.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E9CAC1A.5040709>