mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
libcl: avoid calling UNREACHABLE(str) macro without arguments
In commit9ced3148ca("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:
parent
2b6436f971
commit
5649a0aa06
1 changed files with 2 additions and 1 deletions
|
|
@ -101,7 +101,8 @@
|
|||
*/
|
||||
#define UNREACHABLE(str) \
|
||||
do { \
|
||||
assert(!"" str); \
|
||||
(void)"" str; /* str must be a string literal */ \
|
||||
assert(!str); \
|
||||
__builtin_unreachable(); \
|
||||
} while (0)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue