Issue 13338: Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER (original) (raw)

Issue13338

Created on 2011-11-04 00:24 by flub, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
pyatomic.diff flub,2011-11-06 11:33 review
Messages (4)
msg146993 - (view) Author: Floris Bruynooghe (flub) Date: 2011-11-04 00:24
Hi, When compiling using gcc and -Werror=switch-enum the compilation fails, e.g. while compiling an extension module: In file included from /usr/include/python3.2mu/Python.h:52:0, from src/util.c:27: /usr/include/python3.2mu/pyatomic.h: In function ‘_Py_ANNOTATE_MEMORY_ORDER’: /usr/include/python3.2mu/pyatomic.h:61:5: error: enumeration value ‘_Py_memory_order_relaxed’ not handled in switch [-Werror=switch-enum] /usr/include/python3.2mu/pyatomic.h:61:5: error: enumeration value ‘_Py_memory_order_acquire’ not handled in switch [-Werror=switch-enum] /usr/include/python3.2mu/pyatomic.h:70:5: error: enumeration value ‘_Py_memory_order_relaxed’ not handled in switch [-Werror=switch-enum] /usr/include/python3.2mu/pyatomic.h:70:5: error: enumeration value ‘_Py_memory_order_release’ not handled in switch [-Werror=switch-enum] This could be easily resolved without any drawbacks by simply listing the missing enumeration items together with the default. And that would enable extensions to be built using -Werror=switch-enum again. Regards, Floris
msg147152 - (view) Author: Floris Bruynooghe (flub) Date: 2011-11-06 11:33
Apologies for not attaching a patch, I thought it was pretty trivial. Attached it now.
msg147967 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-11-19 20:11
New changeset f855f929bc48 by Petri Lehtinen in branch '3.2': Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER http://hg.python.org/cpython/rev/f855f929bc48 New changeset c2e588a5237a by Petri Lehtinen in branch 'default': Merge branch 3.2 (closes #13338) http://hg.python.org/cpython/rev/c2e588a5237a
msg147968 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2011-11-19 20:12
Your patch was applied with the default: case removed. Thanks!
History
Date User Action Args
2022-04-11 14:57:23 admin set github: 57547
2011-11-19 20:12:55 petri.lehtinen set messages: +
2011-11-19 20:11:09 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: patch review -> resolved
2011-11-06 11:50:36 petri.lehtinen set keywords: + needs reviewstage: needs patch -> patch review
2011-11-06 11:33:23 flub set files: + pyatomic.diffkeywords: + patchmessages: +
2011-11-05 19:48:34 petri.lehtinen set nosy: + petri.lehtinen
2011-11-05 19:48:24 petri.lehtinen set stage: needs patch
2011-11-04 00:24:43 flub create