Re: [PATCH V4 02/11] opt-functions.awk: fix comparison of limit, begin and end

2019-08-28 Thread Jose E. Marchesi
> function integer_range_info(range_option, init, option) > { > if (range_option != "") { > - start = nth_arg(0, range_option); > - end = nth_arg(1, range_option); > + init = init + 0; > + start = nth_arg(0, range_option) + 0; > +

Re: [PATCH V4 02/11] opt-functions.awk: fix comparison of limit, begin and end

2019-08-27 Thread Ulrich Drepper
On Wed, Aug 28, 2019 at 1:47 AM Jose E. Marchesi wrote: > function integer_range_info(range_option, init, option) > { > if (range_option != "") { > - start = nth_arg(0, range_option); > - end = nth_arg(1, range_option); > + init = init + 0; > + start = nth_arg(0, ra

[PATCH V4 02/11] opt-functions.awk: fix comparison of limit, begin and end

2019-08-27 Thread Jose E. Marchesi
The function integer_range_info makes sure that, if provided, the initial value fills in the especified range. However, it is necessary to convert the values to a numerical context before comparing, to make sure awk is using arithmetical order and not lexicographical order. gcc/ChangeLog: