libcl: avoid calling UNREACHABLE(str) macro without arguments
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

In commit 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro
without arguments", 2025-07-30) the argument type check in the
UNREACHABLE(str) macro in src/util/macros.h was improved to also avoid
calling it without arguments, but the definition in
src/compiler/libcl/libcl.h was not updated.

Apply a similar change to src/compiler/libcl/libcl.h to keep the C and
CL macros in sync.

Fixes: 9ced3148ca ("util: avoid calling UNREACHABLE(str) macro without arguments", 2025-07-30)

Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> on gfx8 (Polaris 20)
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36508>
This commit is contained in:
Antonio Ospite 2025-08-01 09:07:57 +02:00
parent 2b6436f971
commit 5649a0aa06

View file

@ -101,7 +101,8 @@
*/
#define UNREACHABLE(str) \
do { \
assert(!"" str); \
(void)"" str; /* str must be a string literal */ \
assert(!str); \
__builtin_unreachable(); \
} while (0)