i think i remember chat answering to me 64b , as cpu ..

intmax() { declare -i i=0 o= ; while (( o = i ,  ++i , i > o )) ; do : ;
done ; echo $o $i ; } ; time intmax

( doesnt appear to finish soon )

On Wed, Jun 18, 2025, 6:00 AM shynur . <one.last.k...@outlook.com> wrote:

> Martin:
> > In variables.c at line 6243 we have
> > eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10;
> >
> > Presumably in your build of Bash, as in mine, `int` is
> > 32-bit, so the maximum value convertible by atoi would
> > be 2147483647.  Larger values are returned modulo
> > 4294967296 (with 2's complement sign handling).
> > atoi("9223372036854775807") returns -1.
> >
> > (This does not limit the range that printf can handle;
> > it will normally cope with at least 64-bit (the size of
> > `intmax_t` and/or `long int`).
>
> Thank you very much!
> I checked `man printf`, and it says "widths are handled" and doesn’t
> accept the '%l' format specifier.
> So it does seem like the default is equivalent to C’s '%ull' rather than
> C’s '%u' (unsigned int).
>
> So, what’s the correct way to get INT_MAX?
> I’m not planning to use it in IGNOREEOF (I’ve already set `IGNOREEOF=127`
> in my `.bash_login`, which big enough), I’m just curious…
>

Reply via email to