<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glsl_parser_extras.cpp", line 1455: Error: Badly formed expression."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86944#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - glsl_parser_extras.cpp", line 1455: Error: Badly formed expression."
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86944">bug 86944</a>
              from <span class="vcard"><a class="email" href="mailto:vlee@freedesktop.org" title="Vinson Lee <vlee@freedesktop.org>"> <span class="fn">Vinson Lee</span></a>
</span></b>
        <pre>(In reply to Matt Turner from <a href="show_bug.cgi?id=86944#c2">comment #2</a>)
<span class="quote">> 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.</span >

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</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>