diff --git a/libc/spec/posix.td b/libc/spec/posix.td index b1aa2fb472124..ee17de8c170c0 100644 --- a/libc/spec/posix.td +++ b/libc/spec/posix.td @@ -984,7 +984,7 @@ def POSIX : StandardSpec<"POSIX"> { >, FunctionSpec< "pthread_exit", - RetValSpec, + RetValSpec, [ArgSpec] >, FunctionSpec< diff --git a/libc/src/pthread/pthread_exit.h b/libc/src/pthread/pthread_exit.h index dd22c57cbecca..d8bdbb3f5bc69 100644 --- a/libc/src/pthread/pthread_exit.h +++ b/libc/src/pthread/pthread_exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void pthread_exit(void *retval); +[[noreturn]] void pthread_exit(void *retval); } // namespace __llvm_libc diff --git a/libc/src/stdlib/exit.h b/libc/src/stdlib/exit.h index 7c015e3c0dae3..fb3b20daf6587 100644 --- a/libc/src/stdlib/exit.h +++ b/libc/src/stdlib/exit.h @@ -13,7 +13,7 @@ namespace __llvm_libc { -void exit(int status); +[[noreturn]] void exit(int status); } // namespace __llvm_libc