From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [commit][obv] Use TYPE_LENGTH directly where possible
Date: Thu, 27 Sep 2012 10:13:00 -0000 [thread overview]
Message-ID: <20120927154248.4561f9c4@spoyarek> (raw)
In-Reply-To: <20120927095917.GA9624@adacore.com>
On Thu, 27 Sep 2012 11:59:17 +0200, Joel wrote:
> > Index: gdb/amd64-tdep.c
> [...]
> > gdb_assert (class[1] != AMD64_MEMORY);
> > - gdb_assert (len <= 16);
> > + gdb_assert (TYPE_LENGTH (type) <= 16);
>
> Add a comment here to warn us against replacing the expression
> with asserting on len, with an explanation as to why. This needs
> to be done at every location where this trick is used.
>
> Do you think it's better to do things this way rather than declare
> len with the correct type?
I'd rather just revert the whole patch. This is the only patch where I
have used this trick. I'll post it for review in a while...
... or I can revert the commit as obvious if it's OK ;)
Regards,
Siddhesh
next prev parent reply other threads:[~2012-09-27 10:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 7:57 Siddhesh Poyarekar
2012-09-26 9:42 ` Joel Brobecker
2012-09-26 9:58 ` Siddhesh Poyarekar
2012-09-26 10:52 ` Joel Brobecker
2012-09-26 14:59 ` Pedro Alves
2012-09-26 15:09 ` Siddhesh Poyarekar
2012-09-26 15:07 ` Tom Tromey
2012-09-28 4:00 ` Mark Kettenis
2012-09-28 8:11 ` Jan Kratochvil
2012-09-27 9:59 ` Joel Brobecker
2012-09-27 10:13 ` Siddhesh Poyarekar [this message]
2012-09-27 10:19 ` Joel Brobecker
2012-09-27 10:42 ` Siddhesh Poyarekar
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=20120927154248.4561f9c4@spoyarek \
--to=siddhesh@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/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