[Mesa-dev] [PATCH 06/53] i965/drm: Use __typeof__ rather than typeof.
Kenneth Graunke
kenneth at whitecape.org
Wed Apr 5 00:09:56 UTC 2017
typeof doesn't seem to exist. This code is going to die soon anyway.
---
src/mesa/drivers/dri/i965/libdrm_lists.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/libdrm_lists.h b/src/mesa/drivers/dri/i965/libdrm_lists.h
index 8926d8d1a67..d0a2528847f 100644
--- a/src/mesa/drivers/dri/i965/libdrm_lists.h
+++ b/src/mesa/drivers/dri/i965/libdrm_lists.h
@@ -96,18 +96,18 @@ typedef struct _drmMMListHead
(__item) = (__temp), (__temp) = (__item)->prev)
#define DRMLISTFOREACHENTRY(__item, __list, __head) \
- for ((__item) = DRMLISTENTRY(typeof(*__item), (__list)->next, __head); \
+ for ((__item) = DRMLISTENTRY(__typeof__(*__item), (__list)->next, __head); \
&(__item)->__head != (__list); \
- (__item) = DRMLISTENTRY(typeof(*__item), \
+ (__item) = DRMLISTENTRY(__typeof__(*__item), \
(__item)->__head.next, __head))
#define DRMLISTFOREACHENTRYSAFE(__item, __temp, __list, __head) \
- for ((__item) = DRMLISTENTRY(typeof(*__item), (__list)->next, __head), \
- (__temp) = DRMLISTENTRY(typeof(*__item), \
+ for ((__item) = DRMLISTENTRY(__typeof__(*__item), (__list)->next, __head), \
+ (__temp) = DRMLISTENTRY(__typeof__(*__item), \
(__item)->__head.next, __head); \
&(__item)->__head != (__list); \
(__item) = (__temp), \
- (__temp) = DRMLISTENTRY(typeof(*__item), \
+ (__temp) = DRMLISTENTRY(__typeof__(*__item), \
(__temp)->__head.next, __head))
#define DRMLISTJOIN(__list, __join) if (!DRMLISTEMPTY(__list)) { \
--
2.12.1
More information about the mesa-dev
mailing list