From: Keith Seitz <keiths@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA 3/4] Remove TYPE_TAG_NAME
Date: Wed, 18 Apr 2018 18:06:00 -0000 [thread overview]
Message-ID: <24661375-32f5-d6a2-aed6-e9c7d7c91433@redhat.com> (raw)
In-Reply-To: <8736zs9z3o.fsf@tromey.com>
On 04/18/2018 10:57 AM, Tom Tromey wrote:
>>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
>
>>> + /* If we have "typedef struct foo {. . .} bar;" do we want to
>>> + print it as "struct foo" or as "bar"? Pick the latter for
>>> + C++, because C++ folk tend to expect things like "class5
>>> + *foo" rather than "struct class5 *foo". */
>>> + if (language == language_c || language == language_minimal)
>
> Keith> I'm almost afraid to ask, but why was language_minimal necessary here?
> Keith> A small comment might be appropriate?
> Keith> [I think I can already guess the heinous reason...] Do you know if
> Keith> there is a test case that specifically covers this block with
> Keith> language_minimal?
>
> I think in this case, I added language_minimal on the theory that it is
> "C-like". I don't think there's a test case.
>
> I can add a comment, and a test case wouldn't be too hard either.
Seeing "language_minimal" caught me off guard. A comment would more than satisfy me.
>
>>> gdb_test "ptype \$structreg" \
>>> "type = struct struct1 {\r\n *v4int8 v4;\r\n *v2int16 v2;\r\n}"
>
> Keith> <rhetorical>Was the tag name never printed until now?</rhetorical> Wow!
>
> Maybe I should have investigated this one more deeply?
> I dunno. The change seemed to make sense to me so I just moved on.
I agree. My rhetorical "question" was really more a statement of disbelief. Things like this seem to catch me by surprise every so often -- sometimes more often than not.
Keith
next prev parent reply other threads:[~2018-04-18 18:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-17 19:51 [RFA 0/4] " Tom Tromey
2018-04-17 19:51 ` [RFA 4/4] Remove type_name_no_tag and rename type_name_no_tag_or_error Tom Tromey
2018-05-31 6:22 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 2/4] Thread language through c_type_print_args Tom Tromey
2018-04-18 17:53 ` Tom Tromey
2018-05-31 1:37 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 1/4] Make c_type_print_varspec_suffix static Tom Tromey
2018-05-31 1:33 ` Joel Brobecker
2018-04-17 19:51 ` [RFA 3/4] Remove TYPE_TAG_NAME Tom Tromey
2018-04-18 16:57 ` Keith Seitz
2018-04-18 17:57 ` Tom Tromey
2018-04-18 18:06 ` Keith Seitz [this message]
2018-05-31 2:35 ` Joel Brobecker
2018-04-18 16:57 ` [RFA 0/4] " Keith Seitz
2018-05-09 15:42 ` Tom Tromey
2018-05-25 17:30 ` 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=24661375-32f5-d6a2-aed6-e9c7d7c91433@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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