Commit 8d40f16a authored by Petri Lehtinen's avatar Petri Lehtinen

Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER

This allows compiling extension modules with -Wswitch-enum on gcc.
Initial patch by Floris Bruynooghe.
parent b1e58fe4
...@@ -64,7 +64,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order) ...@@ -64,7 +64,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
case _Py_memory_order_seq_cst: case _Py_memory_order_seq_cst:
_Py_ANNOTATE_HAPPENS_BEFORE(address); _Py_ANNOTATE_HAPPENS_BEFORE(address);
break; break;
default: case _Py_memory_order_relaxed:
case _Py_memory_order_acquire:
break; break;
} }
switch(order) { switch(order) {
...@@ -73,7 +74,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order) ...@@ -73,7 +74,8 @@ _Py_ANNOTATE_MEMORY_ORDER(const volatile void *address, _Py_memory_order order)
case _Py_memory_order_seq_cst: case _Py_memory_order_seq_cst:
_Py_ANNOTATE_HAPPENS_AFTER(address); _Py_ANNOTATE_HAPPENS_AFTER(address);
break; break;
default: case _Py_memory_order_relaxed:
case _Py_memory_order_release:
break; break;
} }
} }
......
...@@ -124,6 +124,7 @@ Gary S. Brown ...@@ -124,6 +124,7 @@ Gary S. Brown
Oleg Broytmann Oleg Broytmann
Dave Brueck Dave Brueck
Francisco Martín Brugué Francisco Martín Brugué
Floris Bruynooghe
Stan Bubrouski Stan Bubrouski
Erik de Bueger Erik de Bueger
Dick Bulterman Dick Bulterman
......
...@@ -10,6 +10,10 @@ What's New in Python 3.2.3? ...@@ -10,6 +10,10 @@ What's New in Python 3.2.3?
Core and Builtins Core and Builtins
----------------- -----------------
- Issue #13338: Handle all enumerations in _Py_ANNOTATE_MEMORY_ORDER
to allow compiling extension modules with -Wswitch-enum on gcc.
Initial patch by Floris Bruynooghe.
- Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder - Issue #13333: The UTF-7 decoder now accepts lone surrogates (the encoder
already accepts them). already accepts them).
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment