From: David Carlton <carlton@math.stanford.edu>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] handling of 'operator' in cp_find_first_component
Date: Thu, 24 Apr 2003 01:25:00 -0000 [thread overview]
Message-ID: <ro1r87sepvu.fsf@jackfruit.Stanford.EDU> (raw)
In-Reply-To: <ro14r4og6mp.fsf@jackfruit.Stanford.EDU>
On 23 Apr 2003 16:02:06 -0700, David Carlton <carlton@math.stanford.edu> said:
> On Mon, 21 Apr 2003 23:21:52 -0400, Daniel Jacobowitz <drow@mvista.com> said:
>> That said, I still think your patch is OK; on the condition that it
>> handles the test case the comment you're removing refers to. Something
>> like:
>> int foo<operator() (B&)>
>> or whatever it was in the right syntax. Does it, and can you add that
>> to the maint.exp tests?
> It should handle them, but you're right, I should include such
> examples in the maint.exp tests. I'll go off and generate some
> examples first before checking it in.
I've checked it in with more examples, as you requested. I can get
the demangler to produce this:
jackfruit$ c++filt _Z3fooIXadL_Zls1CS0_EEEiv
int foo<&(operator<<(C, C))>()
Just to be on the safe side, I added variants of that without the
extra parens and even without the &, but with a comment that I'd only
seen the first one in the wild. I'm including the new maint.exp patch
below; I didn't change the cp-support.c patch.
David Carlton
carlton@math.stanford.edu
2003-04-23 David Carlton <carlton@bactrian.org>
* gdb.c++/maint.exp (test_first_component): Add tests for
'operator' in more locations.
Index: maint.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/maint.exp,v
retrieving revision 1.1
diff -u -p -r1.1 maint.exp
--- maint.exp 15 Apr 2003 23:07:11 -0000 1.1
+++ maint.exp 23 Apr 2003 23:43:31 -0000
@@ -63,6 +63,18 @@ proc test_first_component {} {
test_single_component "foo(std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >)"
test_single_component "operator>(X::Y)"
+ # Operator names can show up in weird places.
+
+ test_single_component "int operator<< <char>()"
+ test_single_component "T<Cooperator>"
+
+ # NOTE: carlton/2003-04-23: I've only seen the first of these
+ # produced by the demangler, but I'm including two more just to be
+ # on the safe side.
+ test_single_component "int foo<&(operator<<(C, C))>()"
+ test_single_component "int foo<&operator<<(C, C)>()"
+ test_single_component "int foo<operator<<(C, C)>()"
+
gdb_test "maint cp first_component foo::bar" "foo"
gdb_test "maint cp first_component foo::bar::baz" "foo"
gdb_test "maint cp first_component C<A>::bar" "C<A>"
prev parent reply other threads:[~2003-04-23 23:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-18 19:17 David Carlton
2003-04-18 19:47 ` Daniel Berlin
2003-04-22 3:21 ` Daniel Jacobowitz
2003-04-22 15:09 ` Daniel Berlin
2003-04-22 15:23 ` Daniel Jacobowitz
2003-04-23 23:46 ` David Carlton
2003-04-23 23:49 ` David Carlton
2003-04-24 1:13 ` Daniel Berlin
2003-04-23 23:45 ` David Carlton
2003-04-24 1:25 ` David Carlton [this message]
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=ro1r87sepvu.fsf@jackfruit.Stanford.EDU \
--to=carlton@math.stanford.edu \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.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