This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] [patch] 'p->x' vs. 'p.x' and 'print object on'


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]