Issue 28152: Clang warnings: code will never be executed (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/72339

classification

Title: Clang warnings: code will never be executed
Type: Stage:
Components: Versions: Python 3.7

process

Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, python-dev, serhiy.storchaka, vstinner
Priority: normal Keywords:

Created on 2016-09-14 13:45 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg276448 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-14 13:45
The issue #23545 enabled extra warnings on GCC. Clang on FreeBSD now complains about unreachable (dead) code: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Non-Debug%203.x/builds/281/steps/compile/logs/warnings%20%2814%29 Python/ast.c:3133:5: warning: code will never be executed [-Wunreachable-code] Modules/posixmodule.c:10256:5: warning: code will never be executed [-Wunreachable-code] Modules/zipimport.c:1004:22: warning: code will never be executed [-Wunreachable-code] Modules/faulthandler.c:988:5: warning: code will never be executed [-Wunreachable-code] See also my change ea00c88f7f42 which fixed a similar issue in Parser/grammar.c. See also the issue #14656.
msg282435 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-05 16:57
New changeset b3f1210d098d by Victor Stinner in branch 'default': Issue #28152: Fix -Wunreachable-code warnings on Clang https://hg.python.org/cpython/rev/b3f1210d098d New changeset 390fbb9c5e59 by Victor Stinner in branch 'default': Issue #28152: Fix -Wunreachable-code warning on clang https://hg.python.org/cpython/rev/390fbb9c5e59
msg282436 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-05 17:03
New changeset 7c7055305f69 by Victor Stinner in branch 'default': Issue #28152: Fix -Wunreachable-code warning on clang https://hg.python.org/cpython/rev/7c7055305f69
msg282437 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-12-05 17:05
My commits fixed all warnings using clang 3.8.0 on Fedora 25.
msg282439 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2016-12-05 17:12
Thanks Victor.
History
Date User Action Args
2022-04-11 14:58:36 admin set github: 72339
2016-12-05 17:12:20 serhiy.storchaka set messages: +
2016-12-05 17:05:19 vstinner set status: open -> closedresolution: fixedmessages: +
2016-12-05 17:03:13 python-dev set messages: +
2016-12-05 16:57:57 python-dev set nosy: + python-devmessages: +
2016-09-14 13:45:33 vstinner create