This is the mail archive of the 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] c++/13615

>>>>> "Keith" == Keith Seitz <> writes:

Keith> Yeah, the two are rather similar, but not exactly. Nonetheless, with
Keith> much hair-pulling [I haven't much left!], I've been able to modify my
Keith> original patch to fix the problem reported in the above thread. [I did
Keith> not use anything from the suggested patch other than the test case,
Keith> which I've updated a bit.]

Keith> I'm attaching the latest revision of this patch.


Keith> +  sym = cp_lookup_symbol_namespace (scope, name,
Keith> +				    block, domain);
Keith> +  if (sym != NULL)
Keith> +    return sym;
Keith> +
Keith> +  /* A simple lookup failed.  Check if the symbol was defined in
Keith> +     a base class.  */

I wonder if this implements the right search rules.

Suppose you have something like:

namespace N {
  typedef double value_type;
  struct Base { typedef int value_type; };
  struct Derived : public Base { };

ptype N::Derived::value_type should print 'int' -- but from the
comment and placement of this code I wonder if it would print 'double'.

Keith> +      sprintf (concatenated_name, "%s::%s", base_name, name);

Pierre is trying to replace these with xsnprintf.


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