New submission from Floris Bruynooghe <[email protected]>:
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
----------
components: Interpreter Core
messages: 146993
nosy: flub
priority: normal
severity: normal
status: open
title: Not all enumerations used in _Py_ANNOTATE_MEMORY_ORDER
type: compile error
versions: Python 3.2, Python 3.3
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com