diff --git a/mps/code/config.h b/mps/code/config.h index e29127c153c..b781f1da591 100644 --- a/mps/code/config.h +++ b/mps/code/config.h @@ -231,6 +231,16 @@ #define ATTRIBUTE_NO_SANITIZE_ADDRESS #endif +/* Attribute for functions that do not return. + * GCC: + * Clang: + */ +#if defined(MPS_BUILD_GC) || defined(MPS_BUILD_LL) +#define ATTRIBUTE_NORETURN __attribute__((__noreturn__)) +#else +#define ATTRIBUTE_NORETURN +#endif + /* EPVMDefaultSubsequentSegSIZE is a default for the alignment of * subsequent segments (non-initial at each save level) in EPVM. See diff --git a/mps/code/protxc.c b/mps/code/protxc.c index 8f62bb3a5df..58dee81a179 100644 --- a/mps/code/protxc.c +++ b/mps/code/protxc.c @@ -282,6 +282,7 @@ static void protCatchOne(void) * handler won't cause a deadlock. */ +ATTRIBUTE_NORETURN static void *protCatchThread(void *p) { UNUSED(p); for (;;)