Re: [PATCH] braces: avoid signed overflow

2024-10-12 Thread Chet Ramey
On 10/1/24 7:18 PM, Grisha Levit wrote: INTMAX_MAX=9223372036854775807 eval ": {$((INTMAX_MAX-1))..$((INTMAX_MAX))}" braces.c:447:9: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'intmax_t' (aka 'long') Thanks for the report and patch. Chet --

[PATCH] braces: avoid signed overflow

2024-10-01 Thread Grisha Levit
INTMAX_MAX=9223372036854775807 eval ": {$((INTMAX_MAX-1))..$((INTMAX_MAX))}" braces.c:447:9: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'intmax_t' (aka 'long') --- braces.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/b