From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19088 invoked by alias); 24 May 2011 08:27:06 -0000 Received: (qmail 19059 invoked by uid 22791); 24 May 2011 08:27:04 -0000 X-SWARE-Spam-Status: No, hits=1.0 required=5.0 tests=AWL,BAYES_50,FAKE_REPLY_C,SARE_SUB_GETRID,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from outpost1.zedat.fu-berlin.de (HELO outpost1.zedat.fu-berlin.de) (130.133.4.66) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 24 May 2011 08:26:47 +0000 Received: from relay1.zedat.fu-berlin.de ([130.133.4.67]) by outpost1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1QOmww-0001zV-7i>; Tue, 24 May 2011 10:26:46 +0200 Received: from mx.physik.fu-berlin.de ([160.45.64.218]) by relay1.zedat.fu-berlin.de (Exim 4.69) with esmtp (envelope-from ) id <1QOmwv-00066L-Cs>; Tue, 24 May 2011 10:26:45 +0200 Received: from squeeze64.physik.fu-berlin.de ([160.45.66.239]) by mx.physik.fu-berlin.de with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QOmwv-0008A7-6f; Tue, 24 May 2011 10:26:45 +0200 Received: from tburnus by squeeze64.physik.fu-berlin.de with local (Exim 4.72 #1 (Debian)) id 1QOmwv-000759-5j; Tue, 24 May 2011 10:26:45 +0200 Date: Tue, 24 May 2011 11:16:00 -0000 From: Tobias Burnus To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Cc: Nathan Froyd Subject: Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type Message-ID: <20110524082643.GA26691@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg01703.txt.bz2 On Mon 23 May 2011, Nathan Froyd wrote: > Various places in the compiler grab TYPE_ARG_TYPES and grovel through it > when what they're really trying to do is index into the list of argument > types. The patch below introduces nth_arg_type for such situatiosn and > changes a hodgepodge of places to use it. You could, of course, use > function_args_iterator, but I think this approach is somewhat clearer. > > Tested on x86_64-unknown-linux-gnu. OK to commit? > gcc/fortran/ > * trans-decl.c (create_main_function): Call nth_arg_type. The Fortran part is OK. Thanks for the cleanup! Tobias