Date: Mon, 17 Oct 2011 11:39:39 -0600 From: Warner Losh <imp@bsdimp.com> To: Gerald Pfeifer <gerald@pfeifer.com> Cc: freebsd-toolchain@freebsd.org Subject: Re: [toolchain] disable -Wtautological-compare for clang Message-ID: <12466AAB-625F-4D20-80E6-2D4235ED81EC@bsdimp.com> In-Reply-To: <alpine.LNX.2.00.1110170955060.2807@gerinyyl.fvgr> References: <20111017152548.GA66978@freebsd.org> <alpine.LNX.2.00.1110170955060.2807@gerinyyl.fvgr>
next in thread | previous in thread | raw e-mail | index | archive | help
I'm all for leaving it on because things like char are signed on some = architectures and unsigned on others. This leads to bugs that only = appear on one architecture. This warning will, at least, flag those = usages. On Oct 17, 2011, at 10:56 AM, Gerald Pfeifer wrote: > On Mon, 17 Oct 2011, Alexander Best wrote: >> any chance we could disable -Wtautological-compare for clang? i don't=20= >> think comparing an unsigned int against < 0 is worth a warning. = actually=20 >> it's always nice to have such a seatbelt, in case somebody changes = the=20 >> type to int and forgets to introduce such a check. >=20 > I am on the fence on this one, for when I used the equivalent warning > in GCC this did found a number of real issues that I then addressed = for > Wine (as an example). >=20 > Gerald > _______________________________________________ > freebsd-toolchain@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain > To unsubscribe, send any mail to = "freebsd-toolchain-unsubscribe@freebsd.org" >=20 >=20
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?12466AAB-625F-4D20-80E6-2D4235ED81EC>