From 23d8c8c53055336de64d73c2e7e60b69bd70e616 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Fri, 1 Aug 2025 09:07:57 +0200 Subject: [PATCH] libcl: avoid calling UNREACHABLE(str) macro without arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In commit 9ced3148ca1 ("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: 9ced3148ca1 ("util: avoid calling UNREACHABLE(str) macro without arguments", 2025-07-30) Tested-by: Dieter Nützel on gfx8 (Polaris 20) Reviewed-by: Alyssa Rosenzweig Part-of: (cherry picked from commit 5649a0aa06e7f436a7f010e733e60366b471da79) --- .pick_status.json | 2 +- src/compiler/libcl/libcl.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 3b367dfd1ff..577fafbf3df 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/compiler/libcl/libcl.h b/src/compiler/libcl/libcl.h index cf0d210cb76..7743f2fefde 100644 --- a/src/compiler/libcl/libcl.h +++ b/src/compiler/libcl/libcl.h @@ -101,7 +101,8 @@ */ #define unreachable(str) \ do { \ - assert(!"" str); \ + (void)"" str; /* str must be a string literal */ \ + assert(!str); \ __builtin_unreachable(); \ } while (0)