Skip to content

Commit bed0d59

Browse files
committed
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)); | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent 68351e7 commit bed0d59

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

M2/Macaulay2/bin/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ bool interrupts_interruptShield;
5252
void* interpFunc(ArgCell* vargs);
5353
void* profFunc(ArgCell* p);
5454
void* testFunc(ArgCell* p);
55-
void M2_flint_abort(void);
55+
FLINT_NORETURN void M2_flint_abort(void);
5656

5757
static void * GC_start_performance_measurement_0(void *) {
5858
#ifdef GC_start_performance_measurement /* added in bdwgc 8 */
@@ -130,7 +130,7 @@ void profiler_stacktrace(std::ostream &stream, int traceDepth) {
130130
}
131131
}
132132

133-
void M2_flint_abort(void) {
133+
FLINT_NO_RETURN void M2_flint_abort(void) {
134134
profiler_stacktrace(std::cerr, 0);
135135
abort();
136136
}

0 commit comments

Comments
 (0)