Issue24324
Created on 2015-05-29 13:51 by skip.montanaro, last changed 2016-03-08 06:01 by ned.deily. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| unreached.diff | skip.montanaro, 2015-09-18 17:36 | review | ||
| Python351-no-unreachable-check.diff | jgarver, 2016-01-19 17:50 | Cleaner version of Skip's patch. Just changes configure.ac | ||
| Messages (8) | |||
|---|---|---|---|
| msg244377 - (view) | Author: Skip Montanaro (skip.montanaro) * | Date: 2015-05-29 13:51 | |
Makefile.pre defines BASECFLAGS to include -Wunreachable-code. When building in the Linux environment available to me (GCC 4.4.6), compilation spews tons of warnings about "warning: will never be executed". According to this StackOverflow thread: http://stackoverflow.com/questions/14591778/ that flag was always broken in GCC and was eventually removed in 4.5. Maybe we should dispense with it when building Python, at least unless requested by the user. |
|||
| msg245035 - (view) | Author: Skip Montanaro (skip.montanaro) * | Date: 2015-06-08 20:51 | |
I guess this is an autoconf thing. "@BASECFLAGS@" in Makefile.pre.in seems to expand to "-Wsign-compare -Wunreachable-code" in Makefile.pre. |
|||
| msg251001 - (view) | Author: Erik Bray (erik.bray) * | Date: 2015-09-18 14:44 | |
This would definitely be nice to fix. I panicked a bit because of this when I compiled my extension modules against Python 3.5 for the first time. |
|||
| msg251004 - (view) | Author: STINNER Victor (vstinner) * | Date: 2015-09-18 15:21 | |
Can you please propose a patch? |
|||
| msg251017 - (view) | Author: Skip Montanaro (skip.montanaro) * | Date: 2015-09-18 17:36 | |
This seems to work for me. Diff against default. I have no idea how old the autoconf setup is here at work. I imagine you'll want to only apply the configure.ac patch and regenerate configure. |
|||
| msg261323 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-03-08 05:30 | |
New changeset 61f8f7610a88 by Ned Deily in branch '3.5': Issue #24324: Do not enable unreachable code warnings when using https://hg.python.org/cpython/rev/61f8f7610a88 |
|||
| msg261324 - (view) | Author: Roundup Robot (python-dev) | Date: 2016-03-08 05:52 | |
New changeset 8fecf6e17616 by Ned Deily in branch 'default': Issue #24324: merge from 3.5 https://hg.python.org/cpython/rev/8fecf6e17616 |
|||
| msg261325 - (view) | Author: Ned Deily (ned.deily) * | Date: 2016-03-08 06:01 | |
Thanks for the suggested patches. I used a somewhat different approach in an attempt to retain the benefit of the unreachable code warning when using other (non-GCC) compilers, in particular, llvm clang where the warnings do seem to be useful. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2016-03-08 06:01:59 | ned.deily | set | status: open -> closed versions:
+ Python 3.6, - Python 2.7 messages:
+ msg261325 |
| 2016-03-08 05:52:43 | python-dev | set | messages: + msg261324 |
| 2016-03-08 05:30:29 | python-dev | set | nosy:
+ python-dev messages: + msg261323 |
| 2016-01-19 17:50:02 | jgarver | set | files: + Python351-no-unreachable-check.diff |
| 2015-09-18 17:36:42 | skip.montanaro | set | files:
+ unreached.diff keywords: + patch messages: + msg251017 |
| 2015-09-18 15:21:03 | vstinner | set | nosy:
+ vstinner messages: + msg251004 |
| 2015-09-18 14:44:43 | erik.bray | set | nosy:
+ erik.bray messages: + msg251001 |
| 2015-06-11 04:46:03 | rhettinger | set | nosy:
+ pitrou |
| 2015-06-11 04:45:46 | rhettinger | set | nosy:
+ loewis |
| 2015-06-08 20:51:28 | skip.montanaro | set | messages: + msg245035 |
| 2015-05-29 13:51:17 | skip.montanaro | create | |