Skip to content

gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label#148481

Open
clin1234 wants to merge 6 commits intopython:mainfrom
clin1234:patch-7
Open

gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label#148481
clin1234 wants to merge 6 commits intopython:mainfrom
clin1234:patch-7

Conversation

@clin1234
Copy link
Copy Markdown
Contributor

@clin1234 clin1234 commented Apr 13, 2026

To silence the following warnings:

  • Python/generated_cases.c.h:12943:9: warning: unused function '_TAIL_CALL_stop_tracing' [-Wunused-function] and
  • ./Modules/_testinternalcapi/test_cases.c.h:12946:9: warning: unused function '_TAIL_CALL_stop_tracing' [-Wunused-function]

@clin1234 clin1234 changed the title Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label Apr 13, 2026
# Emit tail-callable labels as function defintions
for name, label in analysis.labels.items():
if name == 'stop_tracing':
emitter.emit("#if _Py_TAIL_CALL_INTERP\n")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in the JIT. So you need

#if _Py_TAIL_CALL_INTERP && !defined(_Py_TIER2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants