Mark M2_flint_abort as FLINT_NORETURN - #4519
Open
d-torrance wants to merge 1 commit into
Open
Conversation
d-torrance
force-pushed
the
flint-no-return
branch
from
August 4, 2026 04:44
03fd9f7 to
bed0d59
Compare
Otherwise, compilation can fail w/:
../../../../Macaulay2/d/main.cpp:92:3: fatal error: no matching function for call to 'flint_set_abort'
92 | flint_set_abort(M2_flint_abort);
| ^~~~~~~~~~~~~~~
/usr/include/flint/flint.h:222:6: note: candidate function not viable: no known conversion from 'void ()' to 'void (*)() __attribute__((noreturn))' for 1st argument
222 | void flint_set_abort(FLINT_NORETURN void (*func)(void));
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
d-torrance
force-pushed
the
flint-no-return
branch
from
August 4, 2026 05:03
bed0d59 to
28aa011
Compare
andrew-tawfeek
approved these changes
Aug 4, 2026
andrew-tawfeek
left a comment
Contributor
There was a problem hiding this comment.
This looks good. FLINT_NORETURN matches the callback type expected by flint_set_abort, and applying it to both the declaration and definition is consistent with the fact that the function always calls abort(). I also checked that the macro exists throughout M2's supported FLINT range back to 2.6.3.
AI-assisted review comment made by GPT 4.6-Sol under Andrew's direction in order to observe deeper code reaches.
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.
Otherwise, compilation can fail w/:
I ran into this problem compiling M2 with clang 18.1.3 in Ubuntu 24.04.