summaryrefslogtreecommitdiff
path: root/include/assert.h
AgeCommit message (Collapse)Author
2020-04-17Remove the static_assert() fallback for pre-C11 and pre-C++11kamil
C++ without real static_assert() can be incompatible with the C fallback as presented in openjdk. A pre-C11 compiler can be picky on the implementation.
2019-05-27As a _NETBSD_SOURCE extension define static_assert for pre-c11/c++99kamil
Proposed on source-changes-d.
2019-05-22Limit static_assert visibility to C11.maya
The existing definition caused issues as GCC only provides _Static_assert when building C11 code. This follows the C standard: static_assert available since C11. Fixes https://rt.perl.org/Public/Bug/Display.html?id=134023
2016-10-03Add static_assert macro definition in <assert.h>kamil
This declaration conforms to the C11 standard Reference: ISO/IEC 9899:201x 7.2 Diagnostics <assert.h> _Static_assert performs compile-time assertion checking. According to ISO/IEC 9899:201x (draft) 7.2 Diagnostics <assert.h> defines the static_assert macro which expands to _Static_assert. It's not conditionalized by NDEBUG like the assert macro. According to ISO/IEC N3242=11-0012 (C++1x) the <cassert> header shall define only the assert macro, but not static_assert as it's already part of the C++11 language. Allow to define static_assert in C++ prior the C++11 standard. It might be broken but a nonstandard C++ compiler might support C11-like _Static_assert feature. Note that it's fatal for g++ 5.4, but it works for clang++ 3.8.1. Approved by <joerg>.
2011-08-26__assert and __assert13 are deadjoerg
2008-11-02include <sys/null.h> because _DIAGASSERT(foo == NULL) is too common and somechristos
include it.
2008-08-17Define away __assert_function__ if __lint__.gmcgarry
2005-02-03de-__P -- the hack is long since useless. Discussed with christos,perry
matt, kleink, others. Approved by christos.
2004-07-01Tidy up the namespace: lint -> __lint__.kleink
2004-05-18Remove _assert() again. As has been noted by Ben Harris, this had beenkleink
removed already in rev. 1.4 and was subsequently reinstated by the Lite-2 import. Nothing uses it, and it pollutes user namespace.
2003-08-07Move UCB-licensed code from 4-clause to 3-clause licence.agc
Patches provided by Joel Baker in PR 22270, verified by myself.
2003-06-05EBENISANIDIOT: Remove a spurious '#endif' that crept in under the radar.bjh21
2003-06-05Namespace cleanup: _assert is in the application's namespace, and thus shouldbjh21
only be exposed if _NETBSD_SOURCE is defined. To make life less complicated, define _assert() in terms of assert(), since they always seem to have identical definitions. _assert() was removed back in 1993, but got reinstated with the 4.4Lite import. Maybe it should go again. Nothing in the tree uses it.
2001-05-06Employ __static_cast(); suggested by Dave Sainty in PR lib/11766.kleink
2000-12-20avoid multiple declarations.christos
2000-12-19C99: Print the name of the function enclosing the assertion, if possible.kleink
2000-08-07#ifdef __STDC__ -> #if __STDC__kleink
1999-09-15if _DIAGNOSTIC is defined, define _DIAGASSERT() to call __diagassert(),lukem
otherwise it's a no-op. prototype __diagassert().
1998-11-14Define assert and _assert macros for lint when NDEBUG is present as nothing.christos
1994-10-26new RCS ID format.cgd
1994-05-16update all but ctype.h, dumprestore.h, time.h to 4.4-Lite versions.cgd
USL copyright additions on those. Kill varargs.h, because it can simply be a link to the machine-dependent version.
1993-10-07Use _ASSERT_H_ guard macro so that <sys/cdefs.h> is only included once andjtc
the __assert() helper function is declared once if <assert.h> is included multiple times. Don't support the _assert() macro, nothing uses it and it pollutes the user's namespace.
1993-08-01Add RCS identifiers.mycroft
1993-06-16Make assert macro ansi complient.jtc
1993-03-21initial import of 386bsd-0.1 sourcescgd