From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27420 invoked by alias); 11 Jan 2008 17:00:07 -0000 Received: (qmail 27412 invoked by uid 22791); 11 Jan 2008 17:00:06 -0000 X-Spam-Check-By: sourceware.org Received: from us01smtp2.synopsys.com (HELO kiruna.synopsys.com) (198.182.44.80) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jan 2008 16:59:47 +0000 Received: from maiden.synopsys.com (maiden.synopsys.com [146.225.100.170]) by kiruna.synopsys.com (Postfix) with ESMTP id 82B42F482; Fri, 11 Jan 2008 08:59:45 -0800 (PST) Received: from venkatar-opt-lnx.internal.synopsys.com (localhost [127.0.0.1]) by maiden.synopsys.com (8.9.1/8.9.1) with ESMTP id IAA04732; Fri, 11 Jan 2008 08:59:41 -0800 (PST) Received: from venkatar-opt-lnx.internal.synopsys.com (localhost.localdomain [127.0.0.1]) by venkatar-opt-lnx.internal.synopsys.com (8.13.1/8.12.3) with ESMTP id m0BGxfSe031984; Fri, 11 Jan 2008 08:59:41 -0800 Received: (from jbuck@localhost) by venkatar-opt-lnx.internal.synopsys.com (8.13.1/8.13.1/Submit) id m0BGxaUP031983; Fri, 11 Jan 2008 08:59:36 -0800 Date: Fri, 11 Jan 2008 17:00:00 -0000 From: Joe Buck To: Rehno Lindeque Cc: Ross Smith , gcc@gcc.gnu.org Subject: Re: -Wparentheses lumps too much together Message-ID: <20080111165936.GB31668@synopsys.com> References: <20071219200235.GA21525@oak.schemamania.org> <20071220005030.4971a442.jklowden@freetds.org> <200712201509.20582.paul@codesourcery.com> <476C1461.2050107@ihug.co.nz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i 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: 2008-01/txt/msg00141.txt.bz2 On Fri, Jan 11, 2008 at 09:34:29AM +0200, Rehno Lindeque wrote: > Just a note: Operator precedence is taught as logical AND comes before > OR in logic courses. So it is a sort of a standard mathematical > convention just like + and *. In fact, OR is even represented as a + > in some notations. However it might not be practical to assume all > programmers have a background in logic. A warning that flagged code like if (c1 || c2 && c3) ... would swamp users in warnings, since this kind of code is extremely common, and this isn't the kind of thing that anyone who's not a total C beginner has trouble with.