ensure C99 compliance in headers, as 'I' is reserved#2027
Merged
albinahlback merged 2 commits intoflintlib:mainfrom Jun 20, 2024
Merged
ensure C99 compliance in headers, as 'I' is reserved#2027albinahlback merged 2 commits intoflintlib:mainfrom
albinahlback merged 2 commits intoflintlib:mainfrom
Conversation
Note that the following code
---- cut here: save as t.c
---- cut here
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);
...
Contributor
Author
|
in particular this issue prevents building Sage (sagelib) with numpy 2.0 (which includes complex.h) |
Collaborator
|
Looks good to me, thanks! |
2 tasks
tornaria
added a commit
to tornaria/void-packages
that referenced
this pull request
Aug 20, 2024
Already merged upstream: flintlib/flint#2027
ahesford
pushed a commit
to void-linux/void-packages
that referenced
this pull request
Aug 23, 2024
Already merged upstream: flintlib/flint#2027
jason1987d
pushed a commit
to jason1987d/void-packages
that referenced
this pull request
Sep 17, 2024
Already merged upstream: flintlib/flint#2027
13 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Including
complex.hbefore flint headers leads to errors with modern compilersNote that the following code
fails to compile with a suffciently new compiler, e.g. clang 16 or gcc 14.
So the fix is to rename
ItoIvin function declarations.