https://bugs.freedesktop.org/show_bug.cgi?id=86944

--- Comment #3 from Vinson Lee <v...@freedesktop.org> ---
(In reply to Matt Turner from comment #2)
> Oh, I bet there's something wrong with the macro. I'd try removing the
> typeof(*v) cast in src/util/u_atomic.h around line 173. If that fixes it, we
> should remove those casts from p_atomic_inc_return and p_atomic_dec_return
> as well.

I removed the typeof(*v) cast in u_atomic.h:173. The build gets further and
hits a different build error.

diff --git a/src/util/u_atomic.h b/src/util/u_atomic.h
index 56c5740..afe1b90 100644
--- a/src/util/u_atomic.h
+++ b/src/util/u_atomic.h
@@ -170,7 +170,7 @@
    sizeof(*v) == sizeof(uint64_t) ? atomic_dec_64_nv((uint64_t *)(v)) : \
                                     (assert(!"should not get here"), 0))

-#define p_atomic_cmpxchg(v, old, _new) ((typeof(*v)) \
+#define p_atomic_cmpxchg(v, old, _new) ( \
    sizeof(*v) == sizeof(uint8_t)  ? atomic_cas_8 ((uint8_t  *)(v), (uint8_t
)(old), (uint8_t )(_new)) : \
    sizeof(*v) == sizeof(uint16_t) ? atomic_cas_16((uint16_t *)(v),
(uint16_t)(old), (uint16_t)(_new)) : \
    sizeof(*v) == sizeof(uint32_t) ? atomic_cas_32((uint32_t *)(v),
(uint32_t)(old), (uint32_t)(_new)) : \


"../../src/gallium/include/pipe/p_compiler.h", line 73: warning: typedef
redeclared: uint
"../../src/gallium/include/pipe/p_compiler.h", line 75: warning: typedef
redeclared: ushort
"../../src/gallium/auxiliary/util/u_inlines.h", line 83: operands have
incompatible types:
         void ":" int

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to