From bf960bf28835816eda8ad9dad8be1323b3d788d5 Mon Sep 17 00:00:00 2001 From: angie Date: Tue, 19 Sep 2023 16:19:24 -0300 Subject: [PATCH] brief explanation --- include/PR/os_internal_rsp.h | 1 - include/attributes.h | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/include/PR/os_internal_rsp.h b/include/PR/os_internal_rsp.h index 63c8bf8d1e..a79426bc79 100644 --- a/include/PR/os_internal_rsp.h +++ b/include/PR/os_internal_rsp.h @@ -1,4 +1,3 @@ - #ifndef PR_OS_INTERNAL_RSP_H #define PR_OS_INTERNAL_RSP_H diff --git a/include/attributes.h b/include/attributes.h index db4b420d11..ea54a323eb 100644 --- a/include/attributes.h +++ b/include/attributes.h @@ -1,10 +1,15 @@ #ifndef ATTRIBUTES_H #define ATTRIBUTES_H +// If not building with a modern GCC-like compiler then make any use of __attribute__ a no-op #if (!defined(__GNUC__) && !defined(__clang__)) || defined(M2CTX) || defined(__sgi) #ifndef __attribute__ #define __attribute__(x) #endif #endif +#define UNUSED __attribute__((unused)) +#define FALLTHROUGH __attribute__((fallthrough)) +#define NORETURN __attribute__((noreturn)) + #endif