From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/c/language%2Fattributes%2Fnoreturn.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 devdocs/c/language%2Fattributes%2Fnoreturn.html (limited to 'devdocs/c/language%2Fattributes%2Fnoreturn.html') diff --git a/devdocs/c/language%2Fattributes%2Fnoreturn.html b/devdocs/c/language%2Fattributes%2Fnoreturn.html new file mode 100644 index 00000000..6d75ac4c --- /dev/null +++ b/devdocs/c/language%2Fattributes%2Fnoreturn.html @@ -0,0 +1,24 @@ +

C attribute: noreturn, _Noreturn (since C23) +

Indicates that the function does not return.

+

Syntax

+ + +
[[ noreturn ]]
[[ __noreturn__ ]]
[[ _Noreturn ]]
[[ ___Noreturn__ ]]
(deprecated)

Explanation

Indicates that the function does not return.

+

This attribute applies to the name of the function and specifies that the function does not return by executing the return statement or by reaching the end of the function body (it may return by executing longjmp). The behavior is undefined if the function with this attribute actually returns. A compiler diagnostic is recommended if this can be detected.

+

It has been previously denoted by the keyword _Noreturn until it was deprecated since C23 and replaced by this attribute.

+

Standard library

The following standard functions are declared with noreturn attribute (they used to be declared with _Noreturn specifier until C23):

+

See also

+ +
C documentation for _Noreturn
C++ documentation for [[noreturn]]
+

+ © cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
+ https://en.cppreference.com/w/c/language/attributes/noreturn +

+
-- cgit v1.2.3