From 28aa0111738949e32346d2f78ea64496d4e9a067 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Tue, 4 Aug 2026 00:07:52 -0400 Subject: [PATCH] Mark M2_flint_abort as FLINT_NORETURN 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)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- M2/Macaulay2/bin/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/M2/Macaulay2/bin/main.cpp b/M2/Macaulay2/bin/main.cpp index e062843d82d..401b150dd98 100644 --- a/M2/Macaulay2/bin/main.cpp +++ b/M2/Macaulay2/bin/main.cpp @@ -52,7 +52,7 @@ bool interrupts_interruptShield; void* interpFunc(ArgCell* vargs); void* profFunc(ArgCell* p); void* testFunc(ArgCell* p); -void M2_flint_abort(void); +FLINT_NORETURN void M2_flint_abort(void); static void * GC_start_performance_measurement_0(void *) { #ifdef GC_start_performance_measurement /* added in bdwgc 8 */ @@ -130,7 +130,7 @@ void profiler_stacktrace(std::ostream &stream, int traceDepth) { } } -void M2_flint_abort(void) { +FLINT_NORETURN void M2_flint_abort(void) { profiler_stacktrace(std::cerr, 0); abort(); }