From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15219 invoked by alias); 7 Aug 2008 20:20:58 -0000 Received: (qmail 15211 invoked by uid 22791); 7 Aug 2008 20:20:57 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 07 Aug 2008 20:20:13 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 1EADD983EF; Thu, 7 Aug 2008 20:20:12 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id E27C89809F; Thu, 7 Aug 2008 20:20:11 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1KRBxz-0000iI-AW; Thu, 07 Aug 2008 16:20:11 -0400 Date: Thu, 07 Aug 2008 20:20:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: Paul Pluzhnikov , gdb-patches@sourceware.org Subject: Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on' Message-ID: <20080807202011.GB2374@caradoc.them.org> Mail-Followup-To: Tom Tromey , Paul Pluzhnikov , gdb-patches@sourceware.org References: <20080717214839.6AE253A67B6@localhost> <8ac60eac0807301050id1051q8072925c0d11b96d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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: 2008-08/txt/msg00157.txt.bz2 On Thu, Aug 07, 2008 at 11:31:14AM -0600, Tom Tromey wrote: > Paul> C) Do what the language does: lookup field 'x' in the static type, > Paul> and only try dynamic type if the first lookup failed: > > Paul> I think "C" is the least confusing alternative. > Paul> It may actually be good to do "C" independent of the 'print object' > Paul> setting. > > I agree. This does sound better. I agree too. We have an extension that allows you to use "." on pointers with the implicit dereference; but it shouldn't change the type of the pointer, nor should ->. It's a reasonably well-defined extension as such things go. At least, until you involve user-defined operators. -- Daniel Jacobowitz CodeSourcery