Skip to content

Commit 771248a

Browse files
TylerMSFTTylerMSFT
authored andcommitted
review feedback
1 parent 710cfb0 commit 771248a

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

docs/c-language/noreturn.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ helpviewer_keywords: ["keywords [C]"]
88

99
# `_Noreturn` keyword and `noreturn` macro (C11)
1010

11-
The `_Noreturn` keyword was introduced in C11. It tells the compiler that the function it's applied to doesn't return to the caller. The compiler knows that the code following a call to a `_Noreturn` function is unreachable. An example of a function that doesn't return is `abort()`. If there's a possibility for control flow to return to the caller, the function must not have the `_Noreturn` attribute.
11+
The `_Noreturn` keyword was introduced in C11. It tells the compiler that the function it's applied to doesn't return to the caller. The compiler knows that the code following a call to a `_Noreturn` function is unreachable. An example of a function that doesn't return is [abort](../c-runtime-library/reference/abort.md). If there's a possibility for control flow to return to the caller, the function must not have the `_Noreturn` attribute.
1212

13-
The keyword is typically used through the convenience macro, `noreturn`, provided in <stdnoreturn.h>, which to the `_Noreturn` keyword.
13+
The keyword is typically used through the convenience macro, `noreturn`, provided in <stdnoreturn.h>, which maps to the `_Noreturn` keyword.
1414

1515
The primary benefits for using `_Noreturn` (or the equivalent `noreturn`) are making the intention of the function clear in the code for future readers, and detecting unintentionally unreachable code.
1616

@@ -64,4 +64,5 @@ int main(void)
6464
6565
[/std (Specify language standard version)](../build/reference/std-specify-language-standard-version.md)\
6666
[/W4 (Specify warning level)](../build/reference/compiler-option-warning-level.md)\
67-
[C4702 warning](../error-messages\compiler-warnings\compiler-warning-level-4-c4702.md)
67+
[C4702 warning](../error-messages\compiler-warnings\compiler-warning-level-4-c4702.md)\
68+
[_declspec(noreturn)](../cpp/noreturn.md)

0 commit comments

Comments
 (0)