On Mon, 7 Jan 2013, Jakub Jelinek wrote:
Won't the above preclude parsing 2147483640 up to 2147483647 ?
Because then in the last iteration count 214748364 > (INT_MAX - 9) / 10.
You're right -- thanks for catching that! Below is a patch with a more
precise check.
Nickolai.
--- libiberty/cpl
On Sun, Jan 06, 2013 at 11:25:44PM -0500, Nickolai Zeldovich wrote:
> @@ -494,20 +505,15 @@
>
>while (ISDIGIT ((unsigned char)**type))
> {
> - count *= 10;
> -
> - /* Check for overflow.
> - We assume that count is represented using two's-complement;
> - no power of tw