From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 52699 invoked by alias); 10 Apr 2015 19:40:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 52689 invoked by uid 89); 10 Apr 2015 19:40:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Apr 2015 19:40:12 +0000 Received: from tuna.dhcp.nue.suse.com (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id 8A7ED3F447; Fri, 10 Apr 2015 15:40:09 -0400 (EDT) Date: Fri, 10 Apr 2015 19:40:00 -0000 From: Gerald Pfeifer To: Jakub Jelinek cc: "Joseph S. Myers" , Jason Merrill , gcc-patches@gcc.gnu.org Subject: Re: [C/C++ PATCH] -Wlogical-not-parentheses tweaks (PR c/65120) In-Reply-To: <20150220000326.GT1746@tucnak.redhat.com> Message-ID: References: <20150220000326.GT1746@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00465.txt.bz2 On Fri, 20 Feb 2015, Jakub Jelinek wrote: > As reported, !!x == y is quite common in the Linux kernel and unlike the > !x == y case it usually doesn't mean mistyped !(x == y) or x != y. > clang++ apparently doesn't warn about that either, and it doesn't warn > even about the case where ! is applied to a bool. As the argument is > already folded, it isn't easy to determine those cases always, but I > hope the following is sufficient until we switch to late folding. For what it's worth, with this change you eliminated all except for four false positives in the entire Wine codebase. And those four are really only one (times four) and can be avoided easily apparently. So, good stuff to begin with, and with these improvements even more useful. Thank you! Gerald