| #
ac66081d |
| 12-Sep-2023 |
rillig <rillig@NetBSD.org> |
assert.h: remove custom macro definitions for lint mode
In lint mode, 'assert(cond)' expanded to nothing. This broke code like sqlite that assumes 'assert(cond)' expands to an expression that can b
assert.h: remove custom macro definitions for lint mode
In lint mode, 'assert(cond)' expanded to nothing. This broke code like sqlite that assumes 'assert(cond)' expands to an expression that can be used as operand of the comma operator, as in 'return assert(i > 0), i'.
show more ...
|
| #
3e0acd5a |
| 17-Apr-2020 |
kamil <kamil@NetBSD.org> |
Remove the static_assert() fallback for pre-C11 and pre-C++11
C++ without real static_assert() can be incompatible with the C fallback as presented in openjdk.
A pre-C11 compiler can be picky on th
Remove the static_assert() fallback for pre-C11 and pre-C++11
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.
show more ...
|
| #
002b04a5 |
| 27-May-2019 |
kamil <kamil@NetBSD.org> |
As a _NETBSD_SOURCE extension define static_assert for pre-c11/c++99
Proposed on source-changes-d.
|
| #
4f1d8861 |
| 22-May-2019 |
maya <maya@NetBSD.org> |
Limit static_assert visibility to C11.
The existing definition caused issues as GCC only provides _Static_assert when building C11 code. This follows the C standard: static_assert available since C1
Limit static_assert visibility to C11.
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
show more ...
|
| #
ba27f5b7 |
| 03-Oct-2016 |
kamil <kamil@NetBSD.org> |
Add static_assert macro definition in <assert.h>
This declaration conforms to the C11 standard Reference: ISO/IEC 9899:201x 7.2 Diagnostics <assert.h>
_Static_assert performs compile-time assertion
Add static_assert macro definition in <assert.h>
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>.
show more ...
|
| #
be47d2fc |
| 26-Aug-2011 |
joerg <joerg@NetBSD.org> |
__assert and __assert13 are dead
|
| #
3e6c4846 |
| 02-Nov-2008 |
christos <christos@NetBSD.org> |
include <sys/null.h> because _DIAGASSERT(foo == NULL) is too common and some include it.
|
| #
ff2c02da |
| 17-Aug-2008 |
gmcgarry <gmcgarry@NetBSD.org> |
Define away __assert_function__ if __lint__.
|
| #
19b7469a |
| 03-Feb-2005 |
perry <perry@NetBSD.org> |
de-__P -- the hack is long since useless. Discussed with christos, matt, kleink, others. Approved by christos.
|
| #
11f7fb5f |
| 01-Jul-2004 |
kleink <kleink@NetBSD.org> |
Tidy up the namespace: lint -> __lint__.
|
| #
3788baa1 |
| 18-May-2004 |
kleink <kleink@NetBSD.org> |
Remove _assert() again. As has been noted by Ben Harris, this had been removed already in rev. 1.4 and was subsequently reinstated by the Lite-2 import. Nothing uses it, and it pollutes user namesp
Remove _assert() again. As has been noted by Ben Harris, this had been removed already in rev. 1.4 and was subsequently reinstated by the Lite-2 import. Nothing uses it, and it pollutes user namespace.
show more ...
|
| #
039cc956 |
| 07-Aug-2003 |
agc <agc@NetBSD.org> |
Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22270, verified by myself.
|
| #
ffa655f9 |
| 05-Jun-2003 |
bjh21 <bjh21@NetBSD.org> |
EBENISANIDIOT: Remove a spurious '#endif' that crept in under the radar.
|
| #
37a103a1 |
| 05-Jun-2003 |
bjh21 <bjh21@NetBSD.org> |
Namespace cleanup: _assert is in the application's namespace, and thus should only be exposed if _NETBSD_SOURCE is defined. To make life less complicated, define _assert() in terms of assert(), sinc
Namespace cleanup: _assert is in the application's namespace, and thus should 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.
show more ...
|
| #
c3dba0b2 |
| 06-May-2001 |
kleink <kleink@NetBSD.org> |
Employ __static_cast(); suggested by Dave Sainty in PR lib/11766.
|
| #
b87a6ffa |
| 20-Dec-2000 |
christos <christos@NetBSD.org> |
avoid multiple declarations.
|
| #
f02540ff |
| 19-Dec-2000 |
kleink <kleink@NetBSD.org> |
C99: Print the name of the function enclosing the assertion, if possible.
|
| #
beec9356 |
| 07-Aug-2000 |
kleink <kleink@NetBSD.org> |
#ifdef __STDC__ -> #if __STDC__
|
| #
65047264 |
| 15-Sep-1999 |
lukem <lukem@NetBSD.org> |
if _DIAGNOSTIC is defined, define _DIAGASSERT() to call __diagassert(), otherwise it's a no-op. prototype __diagassert().
|
| #
e5571040 |
| 14-Nov-1998 |
christos <christos@NetBSD.org> |
Define assert and _assert macros for lint when NDEBUG is present as nothing.
|
| #
4d2cbfce |
| 26-Oct-1994 |
cgd <cgd@NetBSD.org> |
new RCS ID format.
|
| #
e6b5ddd9 |
| 16-May-1994 |
cgd <cgd@NetBSD.org> |
update all but ctype.h, dumprestore.h, time.h to 4.4-Lite versions. USL copyright additions on those. Kill varargs.h, because it can simply be a link to the machine-dependent version.
|
| #
b050bfde |
| 07-Oct-1993 |
jtc <jtc@NetBSD.org> |
Use _ASSERT_H_ guard macro so that <sys/cdefs.h> is only included once and the __assert() helper function is declared once if <assert.h> is included multiple times. Don't support the _assert() macro,
Use _ASSERT_H_ guard macro so that <sys/cdefs.h> is only included once and 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.
show more ...
|
| #
e9d867ef |
| 01-Aug-1993 |
mycroft <mycroft@NetBSD.org> |
Add RCS identifiers.
|
| #
7fb7e975 |
| 16-Jun-1993 |
jtc <jtc@NetBSD.org> |
Make assert macro ansi complient.
|