Including complex.h before flint headers leads to errors with modern compilers
Note that the following code
#include <complex.h> /* save as t.c */
#include <flint/mpoly.h>
fails to compile with a suffciently new compiler, e.g. clang 16 or gcc 14.
$ gcc -c t.c
In file included from t.c:1:
/usr/include/flint/mpoly.h:1319:43: error: expected ‘)’ before ‘__extension__’
1319 | void mpoly_gcd_info_init(mpoly_gcd_info_t I, slong nvars);
| ^
In file included from /usr/include/flint/fmpz_types.h:15,
from /usr/include/flint/fmpz_mod_types.h:15,
from /usr/include/flint/mpoly_types.h:15,
from /usr/include/flint/mpoly.h:23,
from t.c:2:
/usr/include/flint/mpoly.h:1319:46: error: expected ‘;’, ‘,’ or ‘)’ before ‘mp_limb_signed_t’
1319 | void mpoly_gcd_info_init(mpoly_gcd_info_t I, slong nvars);
...
So the fix is to rename I to Iv in function declarations.
Including
complex.h
before flint headers leads to errors with modern compilers Note that the following codefails to compile with a suffciently new compiler, e.g. clang 16 or gcc 14.
So the fix is to rename
I
toIv
in function declarations.