<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - "./util/u_inlines.h", line 83: operands have incompatible types: void ":" int"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93189#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - "./util/u_inlines.h", line 83: operands have incompatible types: void ":" int"
href="https://bugs.freedesktop.org/show_bug.cgi?id=93189">bug 93189</a>
from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
<pre>(In reply to Jose Fonseca from <a href="show_bug.cgi?id=93189#c2">comment #2</a>)
<span class="quote">> Vinson, Alan,
>
>
> If Oracle itself has no interest on building Mesa with Solaris Sudio
> component, let's save everybody's time by making that dependency crystal
> clear.</span >
I would tend to agree, but I looked at the code in question:
define p_atomic_inc(v) (void) (\
sizeof(*v) == sizeof(uint8_t) ? atomic_inc_8 ((uint8_t *)(v)) : \
sizeof(*v) == sizeof(uint16_t) ? atomic_inc_16((uint16_t *)(v)) : \
sizeof(*v) == sizeof(uint32_t) ? atomic_inc_32((uint32_t *)(v)) : \
sizeof(*v) == sizeof(uint64_t) ? atomic_inc_64((uint64_t *)(v)) : \
(assert(!"should not get here"), 0))
I don't think that would build on any compiler... and it doesn't seem that hard
to fix.
static inline _p_atomic_inc(void *v, size_t s)
{
assert(s == sizeof(uint8_t) ||
s == sizeof(uint16_t) ||
s == sizeof(uint32_t) ||
s == sizeof(uint64_t));
switch (s) {
case sizeof(uint8_t): atomic_inc_8 ((uint8_t *)(v)); break;
case sizeof(uint16_t): atomic_inc_16((uint16_t *)(v)); break;
case sizeof(uint32_t): atomic_inc_32((uint32_t *)(v)); break;
case sizeof(uint64_t): atomic_inc_64((uint64_t *)(v)); break;
default: unreachable("Bad size");
}
}
#define p_atomic_inc(v) _p_atomic_inc(v, sizeof(*v))
One could probably create a macro or two to generate the other functions.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>