Index: Doxyfile ================================================================== --- Doxyfile +++ Doxyfile @@ -12,10 +12,11 @@ OF_HAVE_PROPERTIES \ OF_HAVE_SOCKETS \ OF_HAVE_THREADS \ OF_METHOD_NORETURN \ OF_NO_RETURN \ + OF_NO_RETURN_FUNC OF_SENTINEL \ OF_REQUIRES_SUPER \ OF_RETURNS_RETAINED \ OF_RETURNS_NOT_RETAINED \ OF_RETURNS_INNER_POINTER \ Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -942,10 +942,10 @@ #ifdef __cplusplus extern "C" { #endif extern id of_alloc_object(Class class_, size_t extraSize, size_t extraAlignment, void **extra); -extern void OF_NO_RETURN of_method_not_found(id self, SEL _cmd); +extern void OF_NO_RETURN_FUNC of_method_not_found(id self, SEL _cmd); extern uint32_t of_hash_seed; #ifdef __cplusplus } #endif Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -122,11 +122,11 @@ enumerationMutationHandler(id object) { @throw [OFEnumerationMutationException exceptionWithObject: object]; } -void OF_NO_RETURN +void OF_NO_RETURN_FUNC of_method_not_found(id obj, SEL sel) { [obj doesNotRecognizeSelector: sel]; /* @@ -134,11 +134,11 @@ * never return. */ abort(); } -void OF_NO_RETURN +void OF_NO_RETURN_FUNC of_method_not_found_stret(void *st, id obj, SEL sel) { of_method_not_found(obj, sel); } Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -64,15 +64,17 @@ #ifdef __GNUC__ # define OF_INLINE inline __attribute__((__always_inline__)) # define OF_LIKELY(cond) (__builtin_expect(!!(cond), 1)) # define OF_UNLIKELY(cond) (__builtin_expect(!!(cond), 0)) # define OF_CONST_FUNC __attribute__((__const__)) +# define OF_NO_RETURN_FUNC __attribute__((__noreturn__)) #else # define OF_INLINE inline # define OF_LIKELY(cond) cond # define OF_UNLIKELY(cond) cond # define OF_CONST_FUNC +# define OF_NO_RETURN_FUNC #endif /* Required to build universal binaries on OS X */ #ifdef OF_UNIVERSAL # if __BIG_ENDIAN__ Index: src/threading.h ================================================================== --- src/threading.h +++ src/threading.h @@ -100,11 +100,11 @@ extern bool of_thread_new(of_thread_t *thread, void (*function)(id), id object, const of_thread_attr_t *attr); extern void of_thread_set_name(of_thread_t thread, const char *name); extern bool of_thread_join(of_thread_t thread); extern bool of_thread_detach(of_thread_t thread); -extern void OF_NO_RETURN of_thread_exit(void); +extern void OF_NO_RETURN_FUNC of_thread_exit(void); extern void of_once(of_once_t *control, void (*func)(void)); extern bool of_mutex_new(of_mutex_t *mutex); extern bool of_mutex_lock(of_mutex_t *mutex); extern bool of_mutex_trylock(of_mutex_t *mutex); extern bool of_mutex_unlock(of_mutex_t *mutex); Index: src/threading_pthread.m ================================================================== --- src/threading_pthread.m +++ src/threading_pthread.m @@ -148,11 +148,11 @@ of_thread_detach(of_thread_t thread) { return (pthread_detach(thread) == 0); } -void OF_NO_RETURN +void OF_NO_RETURN_FUNC of_thread_exit(void) { pthread_exit(NULL); OF_UNREACHABLE Index: src/threading_winapi.m ================================================================== --- src/threading_winapi.m +++ src/threading_winapi.m @@ -69,11 +69,11 @@ { /* FIXME */ return true; } -void OF_NO_RETURN +void OF_NO_RETURN_FUNC of_thread_exit(void) { ExitThread(0); OF_UNREACHABLE