@@ -1484,7 +1484,7 @@ _dispatch_queue_drain_try_unlock(dispatch_queue_t dq, uint64_t owned, bool done)
14841484// type_t * {volatile,const,_Atomic,...} -> type_t *
14851485// type_t[] -> type_t *
14861486#define os_unqualified_pointer_type (expr ) \
1487- typeof(typeof (*(expr)) *)
1487+ __typeof__(__typeof__ (*(expr)) *)
14881488
14891489#define os_mpsc_node_type (q , _ns ) \
14901490 os_unqualified_pointer_type((q)->_ns##_head)
@@ -1525,7 +1525,7 @@ _dispatch_queue_drain_try_unlock(dispatch_queue_t dq, uint64_t owned, bool done)
15251525 _dispatch_wait_until(os_atomic_load2o(_n, _o_next, dependency))
15261526
15271527#define os_mpsc_pop_head (q , _ns , head , _o_next ) ({ \
1528- typeof (q) _q = (q); \
1528+ __typeof__ (q) _q = (q); \
15291529 os_mpsc_node_type(_q, _ns) _head = (head), _n; \
15301530 _n = os_atomic_load2o(_head, _o_next, dependency); \
15311531 os_atomic_store2o(_q, _ns##_head, _n, relaxed); \
@@ -1540,7 +1540,7 @@ _dispatch_queue_drain_try_unlock(dispatch_queue_t dq, uint64_t owned, bool done)
15401540 })
15411541
15421542#define os_mpsc_undo_pop_head (q , _ns , head , next , _o_next ) ({ \
1543- typeof (q) _q = (q); \
1543+ __typeof__ (q) _q = (q); \
15441544 os_mpsc_node_type(_q, _ns) _head = (head), _n = (next); \
15451545 if (unlikely(!_n && \
15461546 !os_atomic_cmpxchg2o(_q, _ns##_tail, NULL, _head, relaxed))) { \
@@ -1551,7 +1551,7 @@ _dispatch_queue_drain_try_unlock(dispatch_queue_t dq, uint64_t owned, bool done)
15511551 })
15521552
15531553#define os_mpsc_capture_snapshot (q , _ns , tail ) ({ \
1554- typeof (q) _q = (q); \
1554+ __typeof__ (q) _q = (q); \
15551555 os_mpsc_node_type(_q, _ns) _head = os_mpsc_get_head(q, _ns); \
15561556 os_atomic_store2o(_q, _ns##_head, NULL, relaxed); \
15571557 /* 22708742: set tail to NULL with release, so that NULL write */ \
@@ -1568,7 +1568,7 @@ _dispatch_queue_drain_try_unlock(dispatch_queue_t dq, uint64_t owned, bool done)
15681568 _n; })
15691569
15701570#define os_mpsc_prepend (q , _ns , head , tail , _o_next ) ({ \
1571- typeof (q) _q = (q); \
1571+ __typeof__ (q) _q = (q); \
15721572 os_mpsc_node_type(_q, _ns) _head = (head), _tail = (tail), _n; \
15731573 os_atomic_store2o(_tail, _o_next, NULL, relaxed); \
15741574 if (unlikely(!os_atomic_cmpxchg2o(_q, _ns##_tail, NULL, _tail, release))) { \
0 commit comments