On Sun, 2024-01-07 at 16:09 -0800, Paul Eggert wrote:
> * src/arscan.c (parse_int): Use intprops.h macros rather than trying
> to detect integer overflow by hand, and doing it incorrectly.
> Here is an example of why the old code was incorrect.
> If val == 3689348814741910323, base == 10, *ptr == '
On 1/7/24 16:09, Paul Eggert wrote:
* src/arscan.c (parse_int): Use intprops.h macros rather than trying
to detect integer overflow by hand, and doing it incorrectly.
Here is an example of why the old code was incorrect.
If val == 3689348814741910323, base == 10, *ptr == '0', UINTMAX_WIDTH == 64,
* src/arscan.c (parse_int): Use intprops.h macros rather than trying
to detect integer overflow by hand, and doing it incorrectly.
Here is an example of why the old code was incorrect.
If val == 3689348814741910323, base == 10, *ptr == '0', UINTMAX_WIDTH == 64,
then (val * base) + (*ptr - '0') yiel