summaryrefslogtreecommitdiff
path: root/doc/posix-headers/assert.texi
Commit message (Collapse)AuthorAgeFilesLines
* assert-h: static_assert is a keyword in C23Paul Eggert2022-09-131-14/+23
| | | | | | | | | | | | * m4/assert_h.m4 (gl_ASSERT_H): Also test for static_assert keyword a la C23, and define HAVE_C_STATIC_ASSERT if so. If not, arrange for config.h to #define static_assert by including <assert.h>, and then do "#undef assert" so that the assert macro still needs an explicit include. This should be safe even on very old hosts, as assert.h has been re-includable for decades. * tests/tests-assert.c: New test. * modules/assert-h-tests (Files, Makefile.am): Add it.
* doc: C2X -> C2xPaul Eggert2021-07-311-1/+1
|
* Update some URLsPaul Eggert2019-09-221-1/+1
| | | | | | This is a clerical change that mostly changes http: to https: in URLs where either will work. It also updates some URLs that have moved, removes some URLs that no longer work, and fixes related text.
* Support C2X and C++17 static_assertPaul Eggert2019-05-091-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | C2X and C++17 finally added support for a simple, single-argument ‘static_assert’ that implements what the Gnulib ‘verify’ macro was doing back in 2005. Implement static_assert on older platforms. The only remaining advantage of ‘verify’ is a shorter name. * doc/posix-headers/assert.texi (assert.h): * doc/verify.texi (Compile-time Assertions): Modernize for C2X and C++17. * lib/verify.h (_GL_HAVE__STATIC_ASSERT1, _GL_HAVE_STATIC_ASSERT1): New macros. (_GL_HAVE__STATIC_ASSERT): Remove. (_GL_HAVE__STATIC_ASSERT): Rely more heavily on __STDC_VERSION__. (_GL_VERIFY_TRUE, _GL_VERIFY_TYPE): Remove 2nd arg, the diagnostic string. All callers changed. (_GL_VERIFY): Require 3 or more args, of which only the first 2 are used. All callers changed. (_Static_assert): Allow either 1 or 2 args, and define if !_GL_HAVE__STATIC_ASSERT1 instead of defining if !_GL_HAVE__STATIC_ASSERT. (static_assert): Define if !_GL_HAVE_STATIC_ASSERT1 instead of defining if !_GL_HAVE_STATIC_ASSERT. (verify_expr, verify): Don’t bother trying to copy the expression into the diagnostic, since 1-argument static_assert doesn’t. (verify): Prefer 1-argument _Static_assert if it works. * m4/assert_h.m4 (gl_ASSERT_H): Check for 1-argument static_assert.
* doc: C11 and C++11 are now officialPaul Eggert2012-01-061-3/+3
|
* assert-h: new module, which supports C1X-style static_assertPaul Eggert2011-05-051-1/+20
| | | | | | | | | | | | | | | | | | | | | * lib/assert.in.h, m4/assert_h.m4, modules/assert-h: New files. * lib/verify.h: Revamp so that this can be copied into assert.h, while retaining the ability to use it standalone as before. Rename private identifiers so as not to encroach on the standard C namespace, since this is now used by assert.h. (_GL_VERIFY_TYPE): New macro, factoring out differing parts of the old verify_true. (_GL_VERIFY_TRUE): New macro, with much of the contents of the old verify_true. Use _GL_VERIFY_TYPE. (_GL_VERIFY): New macro, with much of the contents of the old verify. (static_assert): New macro, if _GL_STATIC_ASSERT_H is defined and static_assert is not; _GL_STATIC_ASSERT_H is defined when this file is copied into the replacement assert.h. (_Static_assert): New macro, if _GL_STATIC_ASSERT_H is defined and _Static_assert is not built in. (verify_true, verify): Define only if _GL_STATIC_ASSERT_H is not defined, and use the new macros mentioned above. * doc/posix-headers/assert.texi: Document this.
* Update doc for POSIX:2008.Bruno Haible2010-10-021-1/+1
| | | | | * doc/posix-headers/*.texi [except ucontext.texi, sys_timeb.texi]: Update URL of POSIX specification.
* avoid some overlong lines from posix urls, etc.Karl Berry2010-08-131-1/+1
|
* Rename two directories: headers -> posix-headers, functions -> posix-functions.Bruno Haible2008-01-201-0/+14