From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32614 invoked by alias); 23 May 2011 14:13:14 -0000 Received: (qmail 32600 invoked by uid 22791); 23 May 2011 14:13:13 -0000 X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_50,SARE_SUB_GETRID,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 May 2011 14:12:59 +0000 Received: (qmail 9864 invoked from network); 23 May 2011 14:12:58 -0000 Received: from unknown (HELO ?192.168.1.78?) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 May 2011 14:12:58 -0000 Message-ID: <4DDA6B68.1080404@codesourcery.com> Date: Mon, 23 May 2011 14:57:00 -0000 From: Nathan Froyd User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0a2) Gecko/20110505 Thunderbird/3.3a4pre MIME-Version: 1.0 To: Richard Guenther 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 References: <20110523135324.GA13949@nightcrawler> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-05/txt/msg01631.txt.bz2 On 05/23/2011 10:05 AM, Richard Guenther wrote: > On Mon, May 23, 2011 at 3:53 PM, Nathan Froyd 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