Title: GH-137959: fix warning 'visibility' attribute ignored in jit/trampoline.c by chris-eibl · Pull Request #140286 · python/cpython · GitHub
Open Graph Title: GH-137959: fix warning 'visibility' attribute ignored in jit/trampoline.c by chris-eibl · Pull Request #140286 · python/cpython
X Title: GH-137959: fix warning 'visibility' attribute ignored in jit/trampoline.c by chris-eibl · Pull Request #140286 · python/cpython
Description: Since #137961 we're getting this warning /home/runner/work/cpython/cpython/Tools/jit/trampoline.c:13:13: warning: 'visibility' attribute ignored [-Wignored-attributes] 13 | typedef DECLARE_TARGET((*jit_func)); | ^ /home/runner/work/cpython/cpython/Tools/jit/jit.h:11:49: note: expanded from macro 'DECLARE_TARGET' 11 | _Py_CODEUNIT *__attribute__((preserve_none, visibility("hidden"))) \ | ^ 1 warning generated. for all platforms, e.g. https://github.com/python/cpython/actions/runs/18575809544/job/52961278295?pr=140233 except i686-pc-windows-msvc, where this warning has to be suppressed cpython/Tools/jit/_targets.py Lines 583 to 587 in f937468 elif re.fullmatch(r"i686-pc-windows-msvc", host): host = "i686-pc-windows-msvc" condition = "defined(_M_IX86)" # -Wno-ignored-attributes: __attribute__((preserve_none)) is not supported here. args = ["-DPy_NO_ENABLE_SHARED", "-Wno-ignored-attributes"] to silence the many warnings we'd get otherwise, because preserve_none is not supported there. I suggest to use cpython/Tools/jit/jit.h Lines 1 to 4 in f937468 // To use preserve_none in JIT builds, we need to declare a separate function // pointer with __attribute__((preserve_none)), since this attribute may not be // supported by the compiler used to build the rest of the interpreter. typedef jit_func __attribute__((preserve_none)) jit_func_preserve_none; I've verified with a small Godbolt demo and by comparing the emit_trampoline in the generated jit_stencils.h that the generated code remains the same. Issue: gh-137959
Open Graph Description: Since #137961 we're getting this warning /home/runner/work/cpython/cpython/Tools/jit/trampoline.c:13:13: warning: 'visibility' attribute ignored [-Wignored-attributes] 13 | typed...
X Description: Since #137961 we're getting this warning /home/runner/work/cpython/cpython/Tools/jit/trampoline.c:13:13: warning: 'visibility' attribute ignored [-Wignored-attributes] 13...
Opengraph URL: https://github.com/python/cpython/pull/140286
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:5a25f525-b8a9-86c2-a102-1e88499da95b |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DC18:CF42F:16F6C:1DD41:696B571D |
| html-safe-nonce | 2b8feba4950f77c034471126dbd6b399f4e5c5f83562d6309f6a1d82b2c6bc89 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzE4OkNGNDJGOjE2RjZDOjFERDQxOjY5NkI1NzFEIiwidmlzaXRvcl9pZCI6IjE0MzI3ODQ3NjY1NDM1NTAyMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 482e68dd74500bc37c2ec4238ab01b8397024315b3c8565733b666dfd871dbcb |
| hovercard-subject-tag | pull_request:2926475902 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/140286/files |
| twitter:image | https://avatars.githubusercontent.com/u/138194463?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/138194463?s=400&v=4 |
| og:image:alt | Since #137961 we're getting this warning /home/runner/work/cpython/cpython/Tools/jit/trampoline.c:13:13: warning: 'visibility' attribute ignored [-Wignored-attributes] 13 | typed... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width