X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=doc%2Fposix-headers%2Fassert.texi;h=785a07aa985602b48da6d0db341e1bbf2c49567e;hb=9e7a6e9093ca226915933ed14029ba7efea0efca;hp=02a1c3b547fcfcf619d2bd7022665ee9fbc1306b;hpb=b14c9a8fe13af6d31cdd5cb0a2210eb6b5e8a620;p=gnulib.git diff --git a/doc/posix-headers/assert.texi b/doc/posix-headers/assert.texi index 02a1c3b54..785a07aa9 100644 --- a/doc/posix-headers/assert.texi +++ b/doc/posix-headers/assert.texi @@ -3,12 +3,31 @@ POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/basedefs/assert.h.html} -Gnulib module: --- +Gnulib module: assert-h + +See also the Gnulib module @code{assert}. Portability problems fixed by Gnulib: @itemize +@item +The C11 and C++11 @code{static_assert}, and the C11 +@code{_Static_assert}, are not supported by many platforms. +For example, GCC versions before 4.6.0 do not support @code{_Static_assert}, +and G++ versions through at least 4.6.0 do not support @code{static_assert}. @end itemize Portability problems not fixed by Gnulib: @itemize +@item +C11 @code{_Static_assert} and C++11 @code{static_assert} +are keywords that can be used without including @code{}. +The Gnulib substitutes are macros that require including @code{}. +@item +The C11 @code{static_assert} and @code{_Static_assert} can also +be used within a @code{struct} or @code{union} specifier, in place of +an ordinary declaration of a member of the struct or union. The +Gnulib substitute can be used only as an ordinary declaration. +@item +In C99, @code{assert} can be applied to any scalar expression. +In C89, the argument to @code{assert} is of type @code{int}. @end itemize