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: [RFA] Fix c++/14819 (implicit this)


>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:

Keith> 2013-11-21  Keith Seitz  <keiths@redhat.com>
Keith> 	PR c++/14819
Keith> 	* c-exp.y (classify_inner_name): If no matching symbol was
Keith> 	found, try looking up the token as a base class.
Keith> 	Likewise if a constructor was found.
Keith> 	* cp-namespace.c (find_type_baseclass_by_name): New function.
Keith> 	* cp-support.h (find_type_baseclass_by_name): Declare.
Keith> 	* valops.c (value_struct_elt_for_reference): If we get
Keith> 	a non-static field, try to get a value based on the
Keith> 	current instance, if any.

Keith> testsuite/ChangeLog
Keith> 2013-11-21  Keith Seitz  <keiths@redhat.com>

Keith> 	PR c++/14819
Keith> 	* gdb.cp/impl-this.cc: New file.
Keith> 	* gdb.cp/impl-this.exp: New file.

Thanks, Keith.  I appreciate your research into my questions.

Keith> +struct type *
Keith> +find_type_baseclass_by_name (struct type *parent_type, const char *name)
Keith> +{
Keith> +  int i;
Keith> +
Keith> +  CHECK_TYPEDEF (parent_type);
Keith> +  for (i = 0; i < TYPE_N_BASECLASSES (parent_type); ++i)
Keith> +    {
Keith> +      struct type *type = TYPE_BASECLASS (parent_type, i);

I think a check_typedef call is needed here.

Ok with that change.

Tom


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