This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gcc 10 emits warning for unused function: _xxsubinterpretersmodule
Type: enhancement Stage: resolved
Components: C API Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: corona10, eric.snow, vstinner
Priority: normal Keywords: patch

Created on 2020-05-13 06:26 by corona10, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 20069 merged corona10, 2020-05-13 13:02
Messages (5)
msg368762 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-05-13 06:26
/oss/cpython/Modules/_xxsubinterpretersmodule.c:1089:1: warning: ‘_sharedexception_is_clear’ defined but not used [-Wunused-function]
 1089 | _sharedexception_is_clear(_sharedexception *she)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
/oss/cpython/Modules/_xxsubinterpretersmodule.c:601:1: warning: ‘_tbsnapshot_is_clear’ defined but not used [-Wunused-function]
  601 | _tbsnapshot_is_clear(_tbsnapshot *tbs)
      | ^~~~~~~~~~~~~~~~~~~~

Both functions are used by the assert statement.
IMHO, it should be replaced by if statement.
msg368777 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-13 12:18
The two functions are only used in assertions. They should be surrounded by "#ifndef NDEBUG (...) #endif".
msg368783 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-05-13 13:38
New changeset fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6 by Dong-hee Na in branch 'master':
bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)
https://github.com/python/cpython/commit/fa0a66e62d087765dbc5c1b89d6149a23ecfb0a6
msg368784 - (view) Author: Dong-hee Na (corona10) * (Python committer) Date: 2020-05-13 13:39
The issue is now fixed.
The PR was tested by me and Victor.

Thanks for the suggestion and review Victor!
msg368848 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-05-14 16:46
New changeset f2c3b6823bc4777d4a14eb0c3615b719521f763a by Victor Stinner in branch 'master':
Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089)
https://github.com/python/cpython/commit/f2c3b6823bc4777d4a14eb0c3615b719521f763a
History
Date User Action Args
2022-04-11 14:59:30adminsetgithub: 84793
2020-05-14 16:46:31vstinnersetmessages: + msg368848
2020-05-13 13:39:53corona10setstatus: open -> closed
resolution: fixed
messages: + msg368784

stage: patch review -> resolved
2020-05-13 13:38:35corona10setmessages: + msg368783
2020-05-13 13:02:32corona10setkeywords: + patch
stage: patch review
pull_requests: + pull_request19376
2020-05-13 12:18:28vstinnersetmessages: + msg368777
2020-05-13 06:26:25corona10settitle: gcc 10 emits error for unused function: _xxsubinterpretersmodule -> gcc 10 emits warning for unused function: _xxsubinterpretersmodule
2020-05-13 06:26:16corona10create