You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gcc 10 emits warning for unused function: _xxsubinterpretersmodule #84793
/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.
changed the title [-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-][+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+]on May 13, 2020
changed the title [-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-][+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+]on May 13, 2020
Activity
corona10 commentedon May 13, 2020
/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.
[-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-][+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+][-]gcc 10 emits error for unused function: _xxsubinterpretersmodule[/-][+]gcc 10 emits warning for unused function: _xxsubinterpretersmodule[/+]vstinner commentedon May 13, 2020
The two functions are only used in assertions. They should be surrounded by "#ifndef NDEBUG (...) #endif".
corona10 commentedon May 13, 2020
New changeset fa0a66e by Dong-hee Na in branch 'master':
bpo-40613: Remove compiler warning from _xxsubinterpretersmodule (GH-20069)
fa0a66e
corona10 commentedon May 13, 2020
The issue is now fixed.
The PR was tested by me and Victor.
Thanks for the suggestion and review Victor!
vstinner commentedon May 14, 2020
New changeset f2c3b68 by Victor Stinner in branch 'master':
Revert "bpo-32604: [_xxsubinterpreters] Propagate exceptions. (GH-19768)" (GH-20089)
f2c3b68