Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-24 Thread Tobias Burnus
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

[PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Nathan Froyd
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

Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Richard Guenther
On Mon, May 23, 2011 at 3:53 PM, Nathan Froyd froy...@codesourcery.com 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

Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Nathan Froyd
On 05/23/2011 10:05 AM, Richard Guenther wrote: On Mon, May 23, 2011 at 3:53 PM, Nathan Froyd froy...@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; + +

Re: [PATCH] get rid of some TYPE_ARG_TYPES usage by introducing nth_arg_type

2011-05-23 Thread Jason Merrill
On 05/23/2011 09:53 AM, Nathan Froyd wrote: #define DECL_CONST_MEMFUNC_P(NODE) \ (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \ - CP_TYPE_CONST_P (TREE_TYPE (TREE_VALUE \ -