Re: [PATCH] make function_args_iterator a proper iterator

2018-11-28 Thread Jeff Law
On 11/20/18 8:28 AM, Martin Sebor wrote: > On 11/20/2018 02:21 AM, Richard Biener wrote: >> On Mon, Nov 19, 2018 at 4:36 PM Martin Sebor wrote: >>> >>> On 11/19/2018 03:32 AM, Richard Biener wrote: On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: > > To encourage and simplify

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-20 Thread Martin Sebor
On 11/20/2018 02:21 AM, Richard Biener wrote: On Mon, Nov 19, 2018 at 4:36 PM Martin Sebor wrote: On 11/19/2018 03:32 AM, Richard Biener wrote: On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: To encourage and simplify the adoption of iterator classes in GCC the attached patch turns

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-20 Thread Richard Biener
On Mon, Nov 19, 2018 at 4:36 PM Martin Sebor wrote: > > On 11/19/2018 03:32 AM, Richard Biener wrote: > > On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: > >> > >> To encourage and simplify the adoption of iterator classes in > >> GCC the attached patch turns the function_args_iterator

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Martin Sebor
On 11/19/2018 03:48 AM, Eric Botcazou wrote: Eventually, when GCC moves to more a recent C++ revision, it will become possible to simplify the for loops to make use of the range based for loop syntax along the lines of: for (auto argtype: function_args (functype)) { ... }

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Martin Sebor
On 11/19/2018 03:32 AM, Richard Biener wrote: On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: To encourage and simplify the adoption of iterator classes in GCC the attached patch turns the function_args_iterator struct into an (almost) proper C++ iterator class that can be used the same

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Eric Botcazou
> Eventually, when GCC moves to more a recent C++ revision, it will > become possible to simplify the for loops to make use of the range > based for loop syntax along the lines of: > >for (auto argtype: function_args (functype)) > { >... > } > > Tested on x86_64-linux, and

Re: [PATCH] make function_args_iterator a proper iterator

2018-11-19 Thread Richard Biener
On Sat, Nov 17, 2018 at 12:05 AM Martin Sebor wrote: > > To encourage and simplify the adoption of iterator classes in > GCC the attached patch turns the function_args_iterator struct > into an (almost) proper C++ iterator class that can be used > the same way as traditional forward iterators. >

[PATCH] make function_args_iterator a proper iterator

2018-11-16 Thread Martin Sebor
To encourage and simplify the adoption of iterator classes in GCC the attached patch turns the function_args_iterator struct into an (almost) proper C++ iterator class that can be used the same way as traditional forward iterators. The patch also replaces all of the 26 uses of the legacy