From dad41d9f217cef9dc6c404d409f6c27b0454b73f Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Fri, 1 Jan 2010 03:04:19 -0500 Subject: [PATCH] Add __noreturn define for __attribute__((noreturn)). --- src/types.h | 5 +++-- src/util.h | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/types.h b/src/types.h index cfa47fe..b2100c1 100644 --- a/src/types.h +++ b/src/types.h @@ -33,8 +33,9 @@ union u64_u32_u { #define UNIQSEC __FILE__ "." __stringify(__LINE__) -extern void __force_link_error__only_in_32bit_flat() __attribute__ ((noreturn)); -extern void __force_link_error__only_in_16bit() __attribute__ ((noreturn)); +#define __noreturn __attribute__((noreturn)) +extern void __force_link_error__only_in_32bit_flat() __noreturn; +extern void __force_link_error__only_in_16bit() __noreturn; #define __ASM(code) asm(".section .text.asm." UNIQSEC "\n\t" code) diff --git a/src/util.h b/src/util.h index f4593ae..50cb336 100644 --- a/src/util.h +++ b/src/util.h @@ -200,8 +200,7 @@ void check_preempt(); // output.c void debug_serial_setup(); void panic(const char *fmt, ...) - __attribute__ ((format (printf, 1, 2))) - __attribute__ ((noreturn)); + __attribute__ ((format (printf, 1, 2))) __noreturn; void printf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); void __dprintf(const char *fmt, ...) @@ -360,7 +359,7 @@ static inline void free(void *data) { void mtrr_setup(void); // romlayout.S -void reset_vector() __attribute__ ((noreturn)); +void reset_vector() __noreturn; // misc.c extern u8 BiosChecksum; -- 2.39.5