-
WikiChip
WikiChip
-
Architectures
Popular x86
-
Intel
- Client
- Server
- Big Cores
- Small Cores
-
AMD
Popular ARM
-
ARM
- Server
- Big
- Little
-
Cavium
-
Samsung
-
-
Chips
Popular Families
-
Ampere
-
Apple
-
Cavium
-
HiSilicon
-
MediaTek
-
NXP
-
Qualcomm
-
Renesas
-
Samsung
-
From WikiChip
Difference between revisions of "c/stdnoreturn.h/noreturn"
< c | stdnoreturn.h
(Created page with "{{DISPLAYTITLE: noreturn macro - <stdnoreturn.h> - C}} {{Stdnoreturn.h - C}} The '''noreturn''' macro, which is part of <stdnoreturn.h>, expands to the [...") |
m (→Example) |
||
Line 18: | Line 18: | ||
#include <stdnoreturn.h> | #include <stdnoreturn.h> | ||
− | + | noreturn void fatal() | |
{ | { | ||
fprintf(stderr, "Program encountered an unrecoverable error\n"); | fprintf(stderr, "Program encountered an unrecoverable error\n"); |
Revision as of 04:29, 27 December 2013
<stdnoreturn.h> C Header |
Macros: |
C Standard Library
The noreturn macro, which is part of <stdnoreturn.h>, expands to the _Noreturn keyword.
Contents
Synopsis
#include <stdnoreturn.h>
#define noreturn _Noreturn
Description
The noreturn object-like macro expands to the _Noreturn, a keyword added in C11 to mark non-returning functions.
Example
#include <stdlib.h>
#include <stdio.h>
#include <stdnoreturn.h>
noreturn void fatal()
{
fprintf(stderr, "Program encountered an unrecoverable error\n");
exit(EXIT_FAILURE);
}