Date: Thu, 3 Nov 2011 11:01:55 +0000 From: Alexander Best <arundel@freebsd.org> To: Gerald Pfeifer <gerald@pfeifer.com>, Matthias Andree <mandree@FreeBSD.org>, Warner Losh <imp@bsdimp.com>, Roman Divacky <rdivacky@freebsd.org> Cc: freebsd-toolchain@freebsd.org Subject: Re: [toolchain] disable -Wtautological-compare for clang Message-ID: <20111103110155.GA32672@freebsd.org> In-Reply-To: <12466AAB-625F-4D20-80E6-2D4235ED81EC@bsdimp.com> References: <20111017152548.GA66978@freebsd.org> <alpine.LNX.2.00.1110170955060.2807@gerinyyl.fvgr> <12466AAB-625F-4D20-80E6-2D4235ED81EC@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon Oct 17 11, Warner Losh wrote: > 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. -funsigned-char / -fsigned-char could be used in that case. cheers. alex > > 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 > >> 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. > > > > 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). > > > > 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" > > > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111103110155.GA32672>