> On 12 Jun 2026, at 15:42, Jakub Jelinek <[email protected]> wrote: > > On Fri, Jun 12, 2026 at 03:37:46PM +0100, Iain Sandoe wrote: >> Builds completed on aarch64 linux and (with devt patches) darwin, >> thoughts? Maybe LLONG_MAX is sufficiently portable? >> or OK for trunk? > > This looks wrong. __LONG_LONG_MAX__ is a GCC (and maybe Clang) > implementation detail, so using it in sources which can be compiled by > arbitrary other compilers (at least in theory) looks wrong. > I think it should just use LLONG_MAX instead of LONG_LONG_MAX.
Yeah, I was half-way to doing that anyway - I think that this is more in line with what the standards docs say than using HOST_WIDE_INT_MAX, As attached, retested on aarch64 darwin and linux, OK for trunk? thanks Iain
0001-aarch64-Use-LLONG_MAX-instead-of-LONG_LONG_MAX.patch
Description: Binary data
> >> @@ -3794,7 +3794,7 @@ aarch64_expand_prefetch_range_builtin (tree exp, int >> fcode) >> non-negative integer. However it is meaningless for >> values less than 2^15 or greater than 2^29. */ >> uint64_t reuse_distance = require_const_argument (exp, argno++, 0, >> - LONG_LONG_MAX); >> + __LONG_LONG_MAX__); >> >> if (seen_error ()) >> return; >> -- >> 2.50.1 (Apple Git-155) > > Jakub >
