Skip to content

Commit 0574f20

Browse files
authored
Add [[noreturn]] for some functions (#3865)
1 parent 828fa10 commit 0574f20

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

stl/src/cthread.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ namespace {
4242
_EXTERN_C
4343

4444
// TRANSITION, ABI: _Thrd_exit() is preserved for binary compatibility
45-
_CRTIMP2_PURE void _Thrd_exit(int res) { // terminate execution of calling thread
45+
[[noreturn]] _CRTIMP2_PURE void _Thrd_exit(int res) { // terminate execution of calling thread
4646
_endthreadex(res);
4747
}
4848

stl/src/mutex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
#include "primitives.hpp"
1515

16-
extern "C" _CRTIMP2_PURE void _Thrd_abort(const char* msg) { // abort on precondition failure
16+
extern "C" [[noreturn]] _CRTIMP2_PURE void _Thrd_abort(const char* msg) { // abort on precondition failure
1717
fputs(msg, stderr);
1818
fputc('\n', stderr);
1919
abort();

stl/src/ppltasks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ extern "C" NTSYSAPI _Success_(return != 0) WORD NTAPI
3535
namespace Concurrency {
3636

3737
namespace details {
38-
_CRTIMP2 void __cdecl _ReportUnobservedException() {
38+
[[noreturn]] _CRTIMP2 void __cdecl _ReportUnobservedException() {
3939

4040
#if (defined(_M_IX86) || defined(_M_X64)) && !defined(_CRT_APP)
4141
if (IsProcessorFeaturePresent(PF_FASTFAIL_AVAILABLE))

0 commit comments

Comments
 (0)