From owner-freebsd-toolchain@FreeBSD.ORG Mon Oct 17 22:40:39 2011 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mandree.no-ip.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 73535106566B for ; Mon, 17 Oct 2011 22:40:39 +0000 (UTC) (envelope-from mandree@FreeBSD.org) Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by apollo.emma.line.org (Postfix) with ESMTP id A244123CF84 for ; Tue, 18 Oct 2011 00:28:42 +0200 (CEST) Message-ID: <4E9CAC1A.5040709@FreeBSD.org> Date: Tue, 18 Oct 2011 00:28:42 +0200 From: Matthias Andree User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Mnenhy/0.8.3 Thunderbird/3.1.15 MIME-Version: 1.0 To: freebsd-toolchain@freebsd.org References: <20111017152548.GA66978@freebsd.org> In-Reply-To: <20111017152548.GA66978@freebsd.org> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: disable -Wtautological-compare for clang X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Oct 2011 22:40:39 -0000 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.