From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 18654 invoked from network); 24 May 2023 13:47:48 -0000 Received: from second.openwall.net (193.110.157.125) by inbox.vuxu.org with ESMTPUTF8; 24 May 2023 13:47:48 -0000 Received: (qmail 12136 invoked by uid 550); 24 May 2023 13:44:10 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 12069 invoked from network); 24 May 2023 13:44:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=message-id:in-reply-to:references:from:date:to: resent-date:resent-from:subject:resent-message-id: resent-to; bh=ooQo2Zt9QUevtiUacst4+b3DX9+O0t0WgPm+vLuGzqc=; b=a+h2cvYwvr7Dp7lWKNXY7t039KrqW+jiqtu3OKl/Wvvv0c5cTCIReNF9 zCrXB+Pwd8D4zJXqe5YDQJSu2T1hO1TLNdRXm2LECbKVbOPL7tsXAdrfD jGFZ2UPgqwYJZFYnnPAzOIdUWp540wDZjqa5GXIIK6E2SU2Gqk8raGWHc w=; Authentication-Results: mail2-relais-roc.national.inria.fr; dkim=none (message not signed) header.i=none; spf=SoftFail smtp.mailfrom=jens.gustedt@inria.fr; dmarc=fail (p=none dis=none) d=inria.fr X-IronPort-AV: E=Sophos;i="6.00,189,1681164000"; d="scan'208";a="109472263" Message-Id: In-Reply-To: References: From: Jens Gustedt Date: Wed, 3 May 2023 11:44:11 +0200 To: musl@lists.openwall.com Resent-Date: Wed, 24 May 2023 15:44:09 +0200 Resent-From: =?UTF-8?B?SuKCkeKCmeKCmw==?= Gustedt Resent-Message-ID: <20230524154409.34fd7b9e@inria.fr> Resent-To: musl@lists.openwall.com Subject: [musl] [C23 feature tests 1/6] C23: provide fallbacks for the use of C attributes --- include/features.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/include/features.h b/include/features.h index 85cfb72a..8e1d84e3 100644 --- a/include/features.h +++ b/include/features.h @@ -35,6 +35,26 @@ #define _Noreturn #endif +#ifdef __has_c_attribute +# if __has_c_attribute(__noreturn__) +# define __noreturn [[__noreturn__]] +# endif +# if __has_c_attribute(__deprecated__) +# define __deprecated [[__deprecated__]] +# endif +#endif + +#ifndef __noreturn +# define __noreturn _Noreturn +#endif +#ifndef __deprecated +# if defined(__GNUC__) +# define __deprecated __attribute__((__deprecated__)) +# else +# define __deprecated +# endif +#endif + #define __REDIR(x,y) __typeof__(x) x __asm__(#y) #endif -- 2.34.1