Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Keith Seitz <keiths@redhat.com>
Cc: "gdb-patches\@sourceware.org ml" <gdb-patches@sourceware.org>
Subject: Re: [RFA] c++/13615
Date: Thu, 08 Nov 2012 21:57:00 -0000	[thread overview]
Message-ID: <874nkzhi6p.fsf@fleche.redhat.com> (raw)
In-Reply-To: <506F38C2.4050107@redhat.com> (Keith Seitz's message of "Fri, 05	Oct 2012 12:45:06 -0700")

>>>>> "Keith" == Keith Seitz <keiths@redhat.com> 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.

Thanks.

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.

Tom


  reply	other threads:[~2012-11-08 21:57 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 23:24 Keith Seitz
2012-09-26 20:52 ` Tom Tromey
2012-10-05 19:45   ` Keith Seitz
2012-11-08 21:57     ` Tom Tromey [this message]
2012-11-08 21:59       ` Tom Tromey
2012-11-14 21:48         ` Keith Seitz
2012-11-15 22:00           ` Tom Tromey
2012-11-16 18:47             ` Keith Seitz
2012-11-16 19:10               ` Tom Tromey
2012-11-16 20:56                 ` Keith Seitz
2012-11-08 22:27       ` Tom Tromey
2012-11-13 20:44       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874nkzhi6p.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox