Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src



Module Name:    src
Committed By:   kamil
Date:           Sun Oct  2 13:09:24 UTC 2016

Modified Files:
        src/distrib/sets/lists/comp: mi
        src/include: Makefile
Added Files:
        src/include: stdnoreturn.h

Log Message:
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>


To generate a diff of this commit:
cvs rdiff -u -r1.2060 -r1.2061 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.141 -r1.142 src/include/Makefile
cvs rdiff -u -r0 -r1.1 src/include/stdnoreturn.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index