I ran into these build failures under gcc 16:
$ make
cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local
-- The C compiler identification is GNU 16.0.1
...
[ 22%] Building C object CMakeFiles/qjs.dir/quickjs.c.o
/src/quickjs.c: In function ‘js_default_module_normalize_name’:
/src/quickjs.c:29087:7: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
29087 | p = strrchr(base_name, '/');
| ^
In function ‘js_bigint_sign’,
inlined from ‘js_bigint_get_si_sat’ at /src/quickjs.c:12114:13,
inlined from ‘js_binary_logic_slow’ at /src/quickjs.c:15091:25:
/src/quickjs.c:12106:18: error: ‘buf2’ may be used uninitialized [-Werror=maybe-uninitialized]
12106 | return a->tab[a->len - 1] >> (JS_LIMB_BITS - 1);
| ~~~~~~^~~~~~~~~~~~
/src/quickjs.c: In function ‘js_binary_logic_slow’:
/src/quickjs.c:15071:27: note: ‘buf2’ declared here
15071 | JSBigIntBuf buf1, buf2;
| ^~~~
In function ‘js_bigint_sign’,
inlined from ‘js_bigint_get_si_sat’ at /src/quickjs.c:12114:13,
inlined from ‘js_binary_logic_slow’ at /src/quickjs.c:15091:25:
/src/quickjs.c:12106:18: error: ‘buf2’ may be used uninitialized [-Werror=maybe-uninitialized]
12106 | return a->tab[a->len - 1] >> (JS_LIMB_BITS - 1);
| ~~~~~~^~~~~~~~~~~~
/src/quickjs.c: In function ‘js_binary_logic_slow’:
/src/quickjs.c:15071:27: note: ‘buf2’ declared here
15071 | JSBigIntBuf buf1, buf2;
| ^~~~
Using latest Debian's gcc build: 16.0.1 20260208 (experimental) [trunk r16-7394-gd93c8a679b2] (Debian 16-20260208-1)
I ran into these build failures under gcc 16:
Using latest Debian's gcc build: 16.0.1 20260208 (experimental) [trunk r16-7394-gd93c8a679b2] (Debian 16-20260208-1)