public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Nathan Froyd <froydnj@codesourcery.com>
To: Richard Guenther <richard.guenther@gmail.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, jason@redhat.com,
	 mikestump@comcast.net
Subject: Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type
Date: Mon, 23 May 2011 14:57:00 -0000	[thread overview]
Message-ID: <4DDA6B68.1080404@codesourcery.com> (raw)
In-Reply-To: <BANLkTimhDmf+yduviDxNewquu_BvdOnYDg@mail.gmail.com>

On 05/23/2011 10:05 AM, Richard Guenther wrote:
> On Mon, May 23, 2011 at 3:53 PM, Nathan Froyd <froydnj@codesourcery.com> wrote:
>> +/* Return the Nth argument type from FNTYPE.  */
>> +
>> +tree
>> +nth_arg_type (const_tree fntype, int n)
>> +{
>> +  function_args_iterator iter;
>> +  tree t;
>> +  int i;
>> +
>> +  gcc_assert (fntype != NULL_TREE);
>> +  gcc_assert (n >= 0);
> 
> Please merge the asserts and do s/gcc_assert/gcc_checking_assert/

Ack.

> And if n should be >= 0 why not pass it in as unsigned?

Consistency with all the other interfaces where n is logically unsigned but
passed in as int?

> The patch is ok with both changes.

Thanks for the review.

-Nathan

  reply	other threads:[~2011-05-23 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-23 14:55 Nathan Froyd
2011-05-23 14:57 ` Richard Guenther
2011-05-23 14:57   ` Nathan Froyd [this message]
2011-05-23 15:02 ` Jason Merrill
2011-05-24 11:16 Tobias Burnus

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=4DDA6B68.1080404@codesourcery.com \
    --to=froydnj@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=mikestump@comcast.net \
    --cc=richard.guenther@gmail.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).