mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 02:38:04 +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> (cherry picked from commit5649a0aa06)
This commit is contained in:
parent
7497828933
commit
23d8c8c530
2 changed files with 3 additions and 2 deletions
|
|
@ -914,7 +914,7 @@
|
|||
"description": "libcl: avoid calling UNREACHABLE(str) macro without arguments",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "9ced3148ca18e8b057e7f2a7e773c701b95c8741",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -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