This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH V4 02/11] opt-functions.awk: fix comparison of limit, begin and end
On Wed, Aug 28, 2019 at 1:47 AM Jose E. Marchesi <jose.marchesi@oracle.com>
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, range_option) + 0;
> + end = nth_arg(1, range_option) + 0;
> if (init != "" && init != "-1" && (init < start || init > end))
In this case the test for init != "" is at least unnecessary.
Maybe something else has to be used. I didn't trace the uses but if init
is deliberately set to "" then the test would have to be replaced with init
!= 0.