From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18688 invoked by alias); 19 Dec 2008 22:48:23 -0000 Received: (qmail 18667 invoked by uid 22791); 19 Dec 2008 22:48:20 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Dec 2008 22:47:45 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBJMlcCW017598; Fri, 19 Dec 2008 17:47:38 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBJMlb27001437; Fri, 19 Dec 2008 17:47:37 -0500 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mBJMla5E005889; Fri, 19 Dec 2008 17:47:36 -0500 Message-ID: <494C2488.7000002@redhat.com> Date: Fri, 19 Dec 2008 23:32:00 -0000 From: Jason Merrill User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Manuel_L=F3pez-Ib=E1=F1ez?= CC: Jakub Jelinek , Gcc Patch List Subject: Re: PR c++/36921 [4.3/4.4 Regression] warning "comparison does not have mathematical meaning" is not correct for overloaded operators that do not return boolean References: <6c33472e0810250750y33c10265g3195e8613de1b1fc@mail.gmail.com> <20081025162735.GM14706@tyan-ft48-01.lab.bos.redhat.com> <6c33472e0811041414l57b4b98ibb84350dcf60117f@mail.gmail.com> In-Reply-To: <6c33472e0811041414l57b4b98ibb84350dcf60117f@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 X-SW-Source: 2008-12/txt/msg01082.txt.bz2 I agree that we don't want to warn for this code, but I think the right place to fix it is in warn_about_parentheses; your patch will also disable the parenthesis warnings for overloaded comparison ops, which we don't want, since precedence is the same regardless of the return type. Jason