From: Daniel Jacobowitz <drow@mvista.com>
To: Michael Elizabeth Chastain <mec@shout.net>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] gdb.c++/method.exp
Date: Mon, 08 Apr 2002 08:19:00 -0000 [thread overview]
Message-ID: <20020408111935.A25907@nevyn.them.org> (raw)
In-Reply-To: <200204081512.g38FCkt17254@duracef.shout.net>
On Mon, Apr 08, 2002 at 10:12:46AM -0500, Michael Elizabeth Chastain wrote:
> Good morning Daniel,
> > Erm... did we reach a conclusion about whether those const's were
> > really optional? In a const method, there should be a const on the
> > type of 'this'.
>
> The old script accepted these strings:
>
> // non-const method
> "A *" => PASS
> default => FAIL
>
> // const method, gcc_compiled=TRUE
> "A *" => PASS
> "const class A *" => XFAIL
> default => FAIL
>
> // const method, gcc_compiled=FALSE
> "const class A *" => PASS
> "A *" => XFAIL
> default => FAIL
>
> // non-const method
> "funk *" => PASS
> default => FAIL
>
> One problem is that none of the tests accepted the second "const"
> after the "*". Another problem, obviously, is the weird logic
> for const methods that depends on gcc_compiled, and *rejects*
> "const A *" for const methods when gcc_compiled=TRUE.
>
> The new script accepts these strings:
>
> // non-const method
> "class A * const" => PASS
> "class A *" => PASS
> "A * const" => PASS
> "A *" => PASS
> default => FAIL
>
> // const method
> "const class A * const" => PASS
> "const class A *" => PASS
> "const A * const" => PASS
> "const A *" => PASS
> "class A * const" => PASS
> "class A *" => PASS
> "A * const" => PASS
> "A *" => PASS
> default => FAIL
>
> // non-const method
> "class A * const" => PASS
> "class A *" => PASS
> "A * const" => PASS
> "A *" => PASS
> default => FAIL
>
> So the old script reported FAIL to "const A *" for a constant method
> when the compiler is gcc. The new script reports PASS. That's a
> definite improvement.
Yes, it is!
> The old script reported PASS to "A *" for a constant method when the
> compiler is gcc. That is problematic. Right now the new script also
> reports PASS, to be compatible with the old script.
>
> Now is a good time to break compatibility anyways. The new script looks
> like this right now (for a const method):
>
> gdb_test "print this" \
> "\\$\[0-9\]* = \\((const |)(class |)A *\\* *(const|)\\) $hex" \
> "print this in A::bar"
>
> What do you think of this:
>
> gdb_test "print this" \
> "\\$\[0-9\]* = \\(const (class |)A *\\* *(const|)\\) $hex" \
> "print this in A::bar"
I think this is right. That will cause failures for 2.95/stabs and
3.0/stabs; we can XFAIL appropriately (based on version numbers even!).
Does anything currently produce A const * const? It's probably
legal...
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-04-08 15:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-08 8:12 Michael Elizabeth Chastain
2002-04-08 8:19 ` Daniel Jacobowitz [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-04-08 10:17 Michael Elizabeth Chastain
2002-04-08 11:43 ` Daniel Jacobowitz
2002-04-08 0:26 Michael Elizabeth Chastain
2002-04-08 0:21 Michael Elizabeth Chastain
2002-04-08 7:37 ` Daniel Jacobowitz
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=20020408111935.A25907@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mec@shout.net \
/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