From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25966 invoked by alias); 23 Jun 2010 17:38:39 -0000 Received: (qmail 25957 invoked by uid 22791); 23 Jun 2010 17:38:38 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Jun 2010 17:38:34 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5NHcX0k006006 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Jun 2010 13:38:33 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5NHcWSr023255; Wed, 23 Jun 2010 13:38:33 -0400 Received: from opsy.redhat.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o5NHcWDA011083; Wed, 23 Jun 2010 13:38:32 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id A76C3888255; Wed, 23 Jun 2010 11:38:31 -0600 (MDT) From: Tom Tromey To: Chris Moller Cc: "gdb-patches\@sourceware.org" Subject: Re: [patch] pr11594 References: <4C20A875.7060204@redhat.com> <4C2115AE.408@redhat.com> Reply-To: Tom Tromey Date: Wed, 23 Jun 2010 17:38:00 -0000 In-Reply-To: <4C2115AE.408@redhat.com> (Chris Moller's message of "Tue, 22 Jun 2010 15:57:34 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00507.txt.bz2 >>>>> "Chris" == Chris Moller writes: Chris> The value_x_binop() result is checked because binop_user_defined_p() Chris> only asserts that it's possible for the operands to represent an Chris> overload, not that there is in fact an overload in this instance. Chris> That's apparently determined in value_x_binop() and if the operator Chris> isn't overloaded, I'm defaulting back to non-overloaded behaviour. Chris> (It seems to me that the language check ought to be in Chris> binop_user_defined_p() or binop_types_user_defined_p()--is there ever Chris> a circumstance other than language_cplus where you can have Chris> overloaded operators?) I don't know of a case. I couldn't see when value_x_binop can actually return NULL. It didn't happen for any of the tests in your .exp. Another thing to consider are cases like "print 5,x" and "print x,5" in your test. These are both valid expressions (g++ accepts them), but with your patch gdb errors out on at least the first one. I think your test should also include a test of non-member "operator,". Tom