[Openmp-commits] [openmp] [OpenMP][libomptarget] Fixes possible no-return warning (PR #70808)
Jan Patrick Lehr via Openmp-commits
openmp-commits at lists.llvm.org
Mon Nov 6 07:24:02 PST 2023
https://github.com/jplehr updated https://github.com/llvm/llvm-project/pull/70808
>From e07681ebbbb5748aa4c9d52de8b56bb8f24a7b1c Mon Sep 17 00:00:00 2001
From: JP Lehr <JanPatrick.Lehr at amd.com>
Date: Tue, 31 Oct 2023 09:55:44 -0400
Subject: [PATCH] [OpenMP][libomptarget] Fixes possible no-return warning
The UNREACHABLE macro resolves to message + trap, which may still give
you no-return warnings. This silences these warnings.
---
openmp/libomptarget/DeviceRTL/include/Debug.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/openmp/libomptarget/DeviceRTL/include/Debug.h b/openmp/libomptarget/DeviceRTL/include/Debug.h
index bd4d40e8f24fd5b..22998f44a5bea5d 100644
--- a/openmp/libomptarget/DeviceRTL/include/Debug.h
+++ b/openmp/libomptarget/DeviceRTL/include/Debug.h
@@ -36,7 +36,8 @@ void __assert_fail_internal(const char *expr, const char *msg, const char *file,
}
#define UNREACHABLE(msg) \
PRINT(msg); \
- __builtin_trap();
+ __builtin_trap(); \
+ __builtin_unreachable();
///}
More information about the Openmp-commits
mailing list