classification
Title: Add -Wimplicit-fallthrough=0 to Makefile ?
Type: Stage:
Components: Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: cstratak, matrixise, serhiy.storchaka, skrah, zach.ware
Priority: normal Keywords:

Created on 2017-07-13 16:36 by matrixise, last changed 2017-07-24 17:15 by cstratak.

Files
File name Uploaded Description Edit
output.txt matrixise, 2017-07-13 16:35
Pull Requests
URL Status Linked Edit
PR 2698 merged skrah, 2017-07-13 18:42
Messages (6)
msg298299 - (view) Author: St├ęphane Wirtel (matrixise) * Date: 2017-07-13 16:35
Hi all,

Since I use the last version of Fedora 26 with gcc-7.1.1, I have these warnings (see output.txt file)

We could add -Wimplicit-fallthrough=0 to Makefile ? it will disable the fallthrough of the coed.

What do you think about that ? What's your feedback on this option and can we use it in the case of CPython ?

Thank you
msg298300 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-13 17:15
It seems to me that by default the compiler recognizes a wide variety of "falls through" comments. Thus we need just add missed comments.

There are warnings emitted when compile imported third-party code. We should ask Stefan for adding "falls through" comments in his libmpdec. And either compile expat with -Wimplicit-fallthrough=0, or wait until warnings will be fixed in upstream, or remove the bundled copy of expat.
msg298302 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-07-13 17:52
It's a useful warning, but I find it annoying to add 20 "fall through" comments. I may add a pragma at some point.
msg298306 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-07-13 18:54
New changeset 72b543308ee3087e3fa247981f5cb4be1138c515 by Stefan Krah in branch 'master':
bpo-30923: Suppress fall-through warnings in libmpdec. (#2698)
https://github.com/python/cpython/commit/72b543308ee3087e3fa247981f5cb4be1138c515
msg298307 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-07-13 18:58
Hmm, that took about 20 min to commit a 3 line diff.  Now I'm watching the buildbots...
msg298312 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2017-07-13 20:16
St├ęphane, if you want the libmpdec change cherry picked and are willing to do the (significant) work of backporting, I'll merge it.
History
Date User Action Args
2017-07-24 17:15:13cstrataksetnosy: + cstratak
2017-07-24 17:10:14zach.warelinkissue31017 superseder
2017-07-13 20:16:06skrahsetmessages: + msg298312
2017-07-13 18:58:49skrahsetmessages: + msg298307
2017-07-13 18:54:22skrahsetmessages: + msg298306
2017-07-13 18:42:43skrahsetpull_requests: + pull_request2764
2017-07-13 17:58:54zach.waresetnosy: + zach.ware
2017-07-13 17:52:15skrahsetmessages: + msg298302
2017-07-13 17:15:51serhiy.storchakasetnosy: + skrah, serhiy.storchaka
messages: + msg298300
2017-07-13 16:36:00matrixisecreate