History log of /netbsd-current/include/stdnoreturn.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: pgoyette-localcount-20161104
# 1.1 02-Oct-2016 kamil

branches: 1.1.2;
Import <stdnoreturn.h>

This header conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.23 _Noreturn <stdnoreturn.h>

According to ISO/IEC 9899:201x (draft) <stdnoreturn.> defines the
noreturn macro which expands to _Noreturn.

The _Noreturn keyword appears in a function declaration and specifies
that the function does not return by reaching the end of the function
body.

Design choices:
- don't implicitly break C++ code including this header with #error
C++11 offers [[noreturn]] which conflicts with C11 _Noreturn

- don't check for __STDC_VERSION__, everybody is free to reuse it with
a nonstandard compiler not conforming to C11 but supporting _Noreturn

gcc(1) and clang(1) support _Noreturn in -std=c99 and older standards

this follows <stdbool.h> choice for not checking for C99

- follow <stdbool.h> and declare the __noreturn_is_defined guard

- use a standard header guard (_STDNORETURN_H_), similar to <stdbool.h>

Reviewed by <pgoyette> and <joerg>