Issue 22110: enable extra compilation warnings
Created on 2014-07-30 21:51 by neologix, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| extra_warnings.diff | neologix, 2014-07-30 21:51 | review | ||
| Messages (10) | |||
|---|---|---|---|
| msg224349 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2014-07-30 21:51 | |
The patch attached enables -Wsign-compare and -Wunreachable-code if supported by the compiler. AFAICT, mixed sign comparison warning is automatically enabled by Microsoft's compiler, and is usually a good thing. It does add some warnings though. As for unreachable code, it's also usually a good thing, since it can be a source of bugs. Note that it's not enabled in debug mode, since in debug mode the code paths aren't the same. |
|||
| msg224354 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2014-07-30 22:18 | |
+1 from me. |
|||
| msg224359 - (view) | Author: STINNER Victor (vstinner) * ![]() |
Date: 2014-07-30 22:36 | |
The patch adds a a lot of new warnings. Would it be possible to fix them before applying the patch? |
|||
| msg224366 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2014-07-31 00:14 | |
Enabling the warnings may be a good incitation for other people to fix them ;) |
|||
| msg224431 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2014-07-31 17:51 | |
> Antoine Pitrou added the comment: > > Enabling the warnings may be a good incitation for other people to fix them ;) That was my intention... Can I push it, and let warnings be fixed on a case-by-case basis? |
|||
| msg224445 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2014-07-31 20:11 | |
Le 31/07/2014 13:51, Charles-François Natali a écrit : > >> >> Enabling the warnings may be a good incitation for other people to fix them ;) > > That was my intention... > > Can I push it, and let warnings be fixed on a case-by-case basis? +1 from me. |
|||
| msg224519 - (view) | Author: Roundup Robot (python-dev) ![]() |
Date: 2014-08-01 20:58 | |
New changeset 2c70897e5f98 by Charles-François Natali in branch 'default': Issue #22110: Enable extra compilation warnings. http://hg.python.org/cpython/rev/2c70897e5f98 |
|||
| msg224523 - (view) | Author: Charles-François Natali (neologix) * ![]() |
Date: 2014-08-01 21:37 | |
Committed. Sorry for the extra ~70 warnings :-) |
|||
| msg224602 - (view) | Author: Arfrever Frehtes Taifersar Arahesis (Arfrever) * ![]() |
Date: 2014-08-03 00:50 | |
GCC >=4.5.0 (released on 2010-04-14) silently accepts and ignores -Wunreachable-code option. I think that build system of Python should not pass unused options to compiler. |
|||
| msg261326 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2016-03-08 06:05 | |
See Issue #24324 which modifies configure to not use -Wunreachable-code with gcc for the reasons stated there and by Arfrever above. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:06 | admin | set | github: 66308 |
| 2016-03-08 06:05:53 | ned.deily | set | nosy:
+ ned.deily messages: + msg261326 |
| 2014-08-03 00:50:30 | Arfrever | set | nosy:
+ Arfrever messages: + msg224602 |
| 2014-08-01 21:37:10 | neologix | set | status: open -> closed resolution: fixed messages: + msg224523 stage: resolved |
| 2014-08-01 20:58:24 | python-dev | set | nosy:
+ python-dev messages: + msg224519 |
| 2014-07-31 20:11:30 | pitrou | set | messages: + msg224445 |
| 2014-07-31 17:51:24 | neologix | set | messages: + msg224431 |
| 2014-07-31 00:33:48 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2014-07-31 00:14:06 | pitrou | set | messages: + msg224366 |
| 2014-07-30 22:36:54 | vstinner | set | messages: + msg224359 |
| 2014-07-30 22:18:28 | pitrou | set | messages: + msg224354 |
| 2014-07-30 21:51:41 | neologix | create | |

