Skip to content

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

Merged
Fidget-Spinner merged 10 commits intopython:mainfrom
clin1234:patch-7
Apr 13, 2026
Merged

gh-148483: Use Py_GCC_ATTRIBUTE(unused) for stop_tracing label#148481
Fidget-Spinner merged 10 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)

…1h8.rst

Co-authored-by: Ken Jin <kenjin4096@gmail.com>
Copy link
Copy Markdown
Member

@Fidget-Spinner Fidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks

@Fidget-Spinner Fidget-Spinner merged commit 10d275f into python:main Apr 13, 2026
89 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants