From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lBbK5-0005im-8Z for barebox@lists.infradead.org; Mon, 15 Feb 2021 10:41:46 +0000 From: Ahmad Fatoum Date: Mon, 15 Feb 2021 11:36:56 +0100 Message-Id: <20210215103704.32537-4-a.fatoum@pengutronix.de> In-Reply-To: <20210215103704.32537-1-a.fatoum@pengutronix.de> References: <20210215103704.32537-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 03/12] ARM: asm: setjmp: annotate setjmp/longjmp for GCC To: barebox@lists.infradead.org Cc: Ahmad Fatoum To avoid invalid optimizations and to enable warnings, GCC must be told that setjmp and longjmp are to be handled specially. Add the missing attributes. Signed-off-by: Ahmad Fatoum --- arch/arm/include/asm/setjmp.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h index 62bac613d6e1..538d9cd50651 100644 --- a/arch/arm/include/asm/setjmp.h +++ b/arch/arm/include/asm/setjmp.h @@ -23,7 +23,7 @@ struct jmp_buf_data { typedef struct jmp_buf_data jmp_buf[1]; -int setjmp(jmp_buf jmp); -void longjmp(jmp_buf jmp, int ret); +int setjmp(jmp_buf jmp) __attribute__((returns_twice)); +void longjmp(jmp_buf jmp, int ret) __attribute__((noreturn)); #endif /* _SETJMP_H_ */ -- 2.29.2 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox