classification
Title: Invalid function cast warnings with gcc 8 for getter and setter functions
Type: compile error Stage: resolved
Components: Build Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: miss-islington, serhiy.storchaka, siddhesh
Priority: normal Keywords: patch

Created on 2018-03-08 15:15 by siddhesh, last changed 2018-11-27 18:55 by serhiy.storchaka. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 10746 merged serhiy.storchaka, 2018-11-27 16:44
PR 10747 merged miss-islington, 2018-11-27 17:34
PR 10749 merged serhiy.storchaka, 2018-11-27 17:48
Messages (7)
msg313443 - (view) Author: Siddhesh Poyarekar (siddhesh) * Date: 2018-03-08 15:15
gcc 8 has added a new warning heuristic to detect invalid function casts and a stock python build seems to hit that warning quite often.  bug 33012 fixes the most trivial case of METH_NOARGS, this bug is to track a similarly trivial but widely applicable fix, which is to cast getter and setter functions.

Patches coming up over the weekend.
msg330507 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-27 11:30
Can you provide your patches Siddhesh?
msg330513 - (view) Author: Siddhesh Poyarekar (siddhesh) * Date: 2018-11-27 11:54
Sorry I haven't had time to look into this since and it doesn't look like I'll be able to get to it in the next couple of weeks.  I had a couple of patches in the github fork but they're pretty outdated and probably not even correct.

If nobody gets to it by Christmas holidays, I'll give it a shot.
msg330541 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-27 17:34
New changeset d4f9cf5545d6d8844e0726552ef2e366f5cc3abd by Serhiy Storchaka in branch 'master':
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
https://github.com/python/cpython/commit/d4f9cf5545d6d8844e0726552ef2e366f5cc3abd
msg330543 - (view) Author: miss-islington (miss-islington) Date: 2018-11-27 17:58
New changeset 5ceb7018dc63fab96f81d05e62bbe704e9f10cb9 by Miss Islington (bot) in branch '3.7':
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
https://github.com/python/cpython/commit/5ceb7018dc63fab96f81d05e62bbe704e9f10cb9
msg330546 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-27 18:38
New changeset 29d2f3c47280f05795c9d4d70f4018cb1488f0ab by Serhiy Storchaka in branch '3.6':
[3.6] bpo-33029: Fix signatures of getter and setter functions. (GH-10746) (GH-10749)
https://github.com/python/cpython/commit/29d2f3c47280f05795c9d4d70f4018cb1488f0ab
msg330550 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-11-27 18:55
I have done this. Thank you for reporting about this issue.

I don't have enough motivation for making a backport for 2.7. If someone want to do this, a PR is welcome.
History
Date User Action Args
2018-11-27 18:55:03serhiy.storchakasetstatus: open -> closed
resolution: fixed
messages: + msg330550

stage: patch review -> resolved
2018-11-27 18:38:39serhiy.storchakasetmessages: + msg330546
2018-11-27 17:58:10miss-islingtonsetnosy: + miss-islington
messages: + msg330543
2018-11-27 17:48:30serhiy.storchakasetpull_requests: + pull_request9997
2018-11-27 17:34:51miss-islingtonsetpull_requests: + pull_request9995
2018-11-27 17:34:38serhiy.storchakasetmessages: + msg330541
2018-11-27 16:44:00serhiy.storchakasetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request9994
2018-11-27 16:33:03serhiy.storchakasetassignee: serhiy.storchaka
versions: + Python 3.6, Python 3.7
2018-11-27 11:54:28siddheshsetmessages: + msg330513
2018-11-27 11:30:20serhiy.storchakasetmessages: + msg330507
2018-03-08 19:12:29serhiy.storchakasetnosy: + serhiy.storchaka
stage: needs patch

versions: + Python 3.8
2018-03-08 15:15:02siddheshcreate