From da6402ccc2bcc567538cceb5d92a27ca8a615e14 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Mon, 31 Mar 2025 19:14:22 +0300 Subject: [PATCH] common: xash3d_types: disable PFN_RETURNS_NONNULL attribute for MCST lcc --- common/xash3d_types.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/xash3d_types.h b/common/xash3d_types.h index f5a3f95d..a7bc8ac2 100644 --- a/common/xash3d_types.h +++ b/common/xash3d_types.h @@ -91,8 +91,10 @@ typedef int qboolean; #define NORETURN __attribute__(( noreturn )) #define NONNULL __attribute__(( nonnull )) #define RETURNS_NONNULL __attribute__(( returns_nonnull )) - #if __clang__ - #define PFN_RETURNS_NONNULL // clang has bugged returns_nonnull for functions pointers, it's ignored and generates a warning about objective-c? O_o + #if __clang__ || __MCST__ + // clang has bugged returns_nonnull for functions pointers, it's ignored and generates a warning about objective-c? O_o + // lcc doesn't support it at all + #define PFN_RETURNS_NONNULL #else #define PFN_RETURNS_NONNULL RETURNS_NONNULL #endif