Skip to content

Commit 6812a5f

Browse files
committed
fix
1 parent 289360a commit 6812a5f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Python/ceval_macros.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@
7878
# define TAIL_CALL_ARGS frame, stack_pointer, tstate, next_instr, instruction_funcptr_table, oparg
7979
#endif
8080

81-
#if _Py_TAIL_CALL_INTERP
81+
#if _Py_TAIL_CALL_INTERP && (defined(__clang__) || defined(__GNUC__))
82+
# if !_Py__has_attribute(preserve_none) || !!_Py__has_attribute(musttail)
83+
# error "This compiler does not have support for efficient tail calling."
84+
# endif
85+
#endif
8286
// Note: [[clang::musttail]] works for GCC 15, but not __attribute__((musttail)) at the moment.
8387
# define Py_MUSTTAIL [[clang::musttail]]
8488
# define Py_PRESERVE_NONE_CC __attribute__((preserve_none))

0 commit comments

Comments
 (0)