diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2021-03-10 09:47:46 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-03-12 09:00:15 +0100 |
commit | a6caadd10fb290556b6cc6a32d60c929dba79f3c (patch) | |
tree | 7c318dc6fcf4b8445144ad2e89b3e47197f9eeb8 /arch/arm/include | |
parent | 9542aa31949e0cbe724720065effd8b12c132154 (diff) | |
download | barebox-a6caadd10fb290556b6cc6a32d60c929dba79f3c.tar.gz barebox-a6caadd10fb290556b6cc6a32d60c929dba79f3c.tar.xz |
ARM: asm: setjmp: annotate setjmp/longjmp for GCC
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 <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/include')
-rw-r--r-- | arch/arm/include/asm/setjmp.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/include/asm/setjmp.h b/arch/arm/include/asm/setjmp.h index 62bac613d6..538d9cd506 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_ */ |