From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19565 invoked by alias); 20 Dec 2007 17:02:36 -0000 Received: (qmail 19557 invoked by uid 22791); 20 Dec 2007 17:02:35 -0000 X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Dec 2007 17:02:28 +0000 Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J5Omw-0002gF-7V for gcc@gnu.org; Thu, 20 Dec 2007 12:02:26 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1J5Oms-0000jS-F0 for gcc@gnu.org; Thu, 20 Dec 2007 12:02:25 -0500 Received: from smtp-out.google.com ([216.239.33.17]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1J5Oms-0000jA-2G for gcc@gnu.org; Thu, 20 Dec 2007 12:02:22 -0500 Received: from zps78.corp.google.com (zps78.corp.google.com [172.25.146.78]) by smtp-out.google.com with ESMTP id lBKH1SeG028593; Thu, 20 Dec 2007 17:01:30 GMT Received: from smtp.corp.google.com (spacemonkey3.corp.google.com [192.168.120.116]) by zps78.corp.google.com with ESMTP id lBKH1RgD006647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 20 Dec 2007 09:01:27 -0800 Received: from localhost.localdomain.google.com (adsl-76-249-168-94.dsl.pltn13.sbcglobal.net [76.249.168.94]) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id lBKH1Q2e006272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 20 Dec 2007 09:01:27 -0800 To: "James K. Lowden" Cc: gcc@gnu.org Subject: Re: -Wparentheses lumps too much together References: <20071219200235.GA21525@oak.schemamania.org> <20071220005030.4971a442.jklowden@freetds.org> From: Ian Lance Taylor Date: Thu, 20 Dec 2007 18:01:00 -0000 In-Reply-To: <20071220005030.4971a442.jklowden@freetds.org> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-12/txt/msg00633.txt.bz2 "James K. Lowden" writes: > > That particular warning happened to find dozens of real errors when I > > ran it over a large code base. It may be noise for you, but I know > > from personal experience that it is very useful. > > I would like to hear more about that, if you wouldn't mind. I'm really > quite surprised. Honestly. I'm not free to share actual details, and I don't have the real percentages anyhow. The warning triggered many false positives. But there were also a number of true positives, far more than I expected. A typical true positive looked more or less like if (a && b || c) often with a more complex condition. The indentation would express the intent, so it was easy to read the code and assume that it meant what it appeared to mean. But, of course, it didn't. Ian