History log of /freebsd-10-stable/include/stdnoreturn.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 229437 03-Jan-2012 ed

Simply disallow <stdnoreturn.h> to be used in combination with C++.

There is no way one could possibly use this header file in combination
with C++ code. The problem is that in C11 the `noreturn' macro expands
to the `_Noreturn' function specifier, while in C++11 the `noreturn'
keyword is an attribute.

So in C11 you have to write:

noreturn void exit(int status);

While in C++11 you have to write:

[[noreturn]] void exit(int status);

It is impossible to #define noreturn for C++ in such a way that it
allows both conventions.

By intentionally breaking this header this way, we prevent people from
using this header in their C++<11 sources.


# 228879 25-Dec-2011 ed

Add <stdalign.h> and <stdnoreturn.h>.

Even though these header files make little sense to me, they are part of
the standard. By including these header files, you can simply use
`alignas', `alignof' and `noreturn' instead of the underscore-prefixed
versions.