The noreturn function attribute

The noreturn function attribute allows you to indicate to the compiler that the function is not intended to return. The language feature provides the programmer with another explicit way to help the compiler optimize code and to reduce false warnings for uninitialized variables.

The return type of the function should be void.

Read syntax diagramSkip visual syntax diagramnoreturn function attribute syntax

Registers saved by the calling function may not necessarily be restored before calling the nonreturning function.

Related information