Please do NOT take this as a critical comment. Nearly all of the 5,006 C module files compiled without a warning.
I am listing the warnings which did come up, so that this can also be fixed.
I found some compiler warnings issued while doing a gcc14 compile to the Flint 3.3.1 package.
The current gmp being used is:
gmp v6.3.0 build options:
Version: GNU MP 6.3.0
Host type: ivybridge-pc-linux-gnu
ABI: 64
Install prefix: /usr/local
Compiler: /usr/bin/gcc-13
Static libraries: yes
Shared libraries: yes
I had to turn off the enable gmp-internals, because the gmp library is missing the appropriate subdirectory for the ivybridge configuration (missing file path)
So I ran "./configure --disable-gmp-internals" which was successful to completion.
While running "make" on Flint v3.3.1 the following gcc-13 compiler warnings were issued:
CC mpn_extras/sqrhigh_basecase.c
/home/owner/math/flint-3.3.1/src/mpn_extras/sqrhigh_basecase.c: In function ‘flint_mpn_sqrhigh_2’:
/home/owner/math/flint-3.3.1/src/mpn_extras/sqrhigh_basecase.c:46:15: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
46 | mp_limb_t b, low;
| ^
----------------------------------------------------------------------------------------------------------------------
CC mpn_extras/mulhigh_recursive.c
In file included from /home/owner/math/flint-3.3.1/src/mpn_extras/mulhigh_recursive.c:13:
In function ‘flint_mpn_mul’,
inlined from ‘_flint_mpn_mulhigh_n_recursive’ at /home/owner/math/flint-3.3.1/src/mpn_extras/mulhigh_recursive.c:69:13:
/home/owner/math/flint-3.3.1/src/mpn_extras.h:498:76: warning: array subscript 16 is above array bounds of ‘mp_limb_t (* const[8])(mp_limb_t *, const mp_limb_t *, const mp_limb_t *)’ {aka ‘long unsigned int (* const[8])(long unsigned int *, const long unsigned int *, const long unsigned int *)’} [-Warray-bounds=]
498 | # define FLINT_MPN_MUL_HARD(rp, xp, xn, yp, yn) (flint_mpn_mul_func_tab[xn][yn](rp, xp, yp))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/home/owner/math/flint-3.3.1/src/mpn_extras.h:534:16: note: in expansion of macro ‘FLINT_MPN_MUL_HARD’
534 | return FLINT_MPN_MUL_HARD(r, x, xn, y, yn);
| ^~~~~~~~~~~~~~~~~~
/home/owner/math/flint-3.3.1/src/mpn_extras.h: In function ‘_flint_mpn_mulhigh_n_recursive’:
/home/owner/math/flint-3.3.1/src/mpn_extras.h:512:45: note: while referencing ‘flint_mpn_mul_func_tab’
512 | FLINT_DLL extern const flint_mpn_mul_func_t flint_mpn_mul_func_tab[][FLINT_MPN_MUL_FUNC_TAB_WIDTH];
| ^~~~~~~~~~~~~~~~~~~~~~
----------------------------------------------------------------------------------------------------------------------
CC mpn_extras/mulhigh_basecase.c
/home/owner/math/flint-3.3.1/src/mpn_extras/mulhigh_basecase.c: In function ‘flint_mpn_mulhigh_2’:
/home/owner/math/flint-3.3.1/src/mpn_extras/mulhigh_basecase.c:219:15: warning: variable ‘b’ set but not used [-Wunused-but-set-variable]
219 | mp_limb_t b, low;
| ^
----------------------------------------------------------------------------------------------------------------------
CC mpn_mod/poly_divrem_basecase.c
In function ‘_mpn_mod_poly_divrem_q1_preinv1’,
inlined from ‘_mpn_mod_poly_divrem_basecase_preinv1’ at /home/owner/math/flint-3.3.1/src/mpn_mod/poly_divrem_basecase.c:179:16:
/home/owner/math/flint-3.3.1/src/mpn_mod/poly_divrem_basecase.c:85:5: warning: ‘q1’ may be used uninitialized [-Wmaybe-uninitialized]
85 | mpn_mod_mul(t, q1, B + (lenB - 2) * nlimbs, ctx);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/owner/math/flint-3.3.1/src/mpn_mod/poly_divrem_basecase.c:12:
/home/owner/math/flint-3.3.1/src/mpn_mod.h: In function ‘_mpn_mod_poly_divrem_basecase_preinv1’:
/home/owner/math/flint-3.3.1/src/mpn_mod.h:164:5: note: by argument 2 of type ‘nn_srcptr’ {aka ‘const long unsigned int *’} to ‘mpn_mod_mul’ declared here
164 | int mpn_mod_mul(nn_ptr res, nn_srcptr x, nn_srcptr y, gr_ctx_t ctx);
| ^~~~~~~~~~~
/home/owner/math/flint-3.3.1/src/mpn_mod/poly_divrem_basecase.c:70:11: note: ‘q1’ declared here
70 | ulong q1[MPN_MOD_MAX_LIMBS];
| ^~
----------------------------------------------------------------------------------------------------------------------
CC acb_theta/ql_exact.c
In function ‘acb_theta_ql_exact_steps’,
inlined from ‘acb_theta_ql_exact’ at /home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:602:9:
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:527:11: warning: ‘rts_all’ may be used uninitialized [-Wmaybe-uninitialized]
527 | res = acb_theta_ql_setup(rts, rts_all, t, &guard, easy_steps, zs, nb, tau, distances,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
528 | nb_steps, all, prec);
| ~~~~~~~~~~~~~~~~~~~~
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c: In function ‘acb_theta_ql_exact’:
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:509:30: note: ‘rts_all’ was declared here
509 | acb_ptr rts, th_init, t, rts_all;
| ^~~~~~~
In function ‘acb_theta_ql_perform_steps’,
inlined from ‘acb_theta_ql_exact_steps’ at /home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:543:9,
inlined from ‘acb_theta_ql_exact’ at /home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:602:9:
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:428:17: warning: ‘aux’ may be used uninitialized [-Wmaybe-uninitialized]
428 | acb_theta_agm_sqrt(aux, aux, rts_all + j * n * n, n * n, prec);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c: In function ‘acb_theta_ql_exact’:
/home/owner/math/flint-3.3.1/src/acb_theta/ql_exact.c:394:31: note: ‘aux’ was declared here
394 | acb_ptr th_next, th_temp, aux;
| ^~~
----------------------------------------------------------------------------------------------------------------------
5,006 C files were compiled. Nearly all had NO warnings or errors. This is a tribute to the very high quality of the c code.
I do have a working flint 3.3.1 library now on my linux system.