summaryrefslogtreecommitdiff
path: root/include/assert.h
AgeCommit message (Collapse)Author
2025-01-12include: add a userland version of __assert_unreachableKyle Evans
The kernel has had a version of this since c79cee71363d ("kernel: provide panicky version of __unreachable"), and userland can benefit from the same. __unreachable is largely inadequate because it's *not* an assertion of any sort, so we're not really alerted to a problem that we could've anticipated. Reviewed by: emaste, imp, jhb, olce Differential Revision: https://reviews.freebsd.org/D48077
2023-11-26include: Remove ancient SCCS tags.Warner Losh
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
2023-08-16Remove $FreeBSD$: one-line .h patternWarner Losh
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
2017-11-20include: further adoption of SPDX licensing ID tags.Pedro F. Giffuni
Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326024
2011-12-29Don't define static_assert for C++.Ed Schouten
Even though _Static_assert() is pretty robust for C code, it cannot work correctly with C++ code. This is due to the fact that C++ template parameters may contain commas that are not enclosed in parentheses. For example: static_assert(foo<int, int>::bar == baz, "..."); This causes _Static_assert to be called with an excessive number of parameters. If you want to use static_assert in C++, just use a C++11 compiler. Reported on: current@, ports@ Notes: svn path=/head/; revision=228955
2011-12-26As per C11, add static_assert() to <assert.h>.Ed Schouten
Notes: svn path=/head/; revision=228902
2011-01-09Add missing __dead2 to __assert().Ed Schouten
__assert() is called when an assertion fails. After printing an error message, it will call abort(). abort() never returns, hence it has the __dead2 attribute. Also add this attribute to __assert(). MFC after: 3 weeks Notes: svn path=/head/; revision=217207
2010-02-16Remove the Berkeley clause 3's.Warner Losh
Add a few $FreeBSD$ Notes: svn path=/head/; revision=203964
2007-12-01Only protect the prototypes with #ifndef _ASSERT_H_, the standardsPoul-Henning Kamp
specifically allow changes to the NDEBUG macro between #includes of assert.h Notes: svn path=/head/; revision=174133
2007-12-01Add missing #ifndef _ASSERT_H_ protection against multiple inclusionsPoul-Henning Kamp
Notes: svn path=/head/; revision=174131
2002-03-23Breath deep and take __P out of the system include files.Warner Losh
# This appears to not break X11, but I'm having problems compiling the # glide part of the server with or without this patch, so I can't tell # for sure. Notes: svn path=/head/; revision=93032
2001-10-27Restore K&R prototype. Fix other style bugs.Mike Barcroft
Reviewed by: asmodai, bde Notes: svn path=/head/; revision=85605
2001-10-24Add $FreeBSD$.Jeroen Ruigrok van der Werven
Change assert() macro to print failing function name. Change K&R function prototype wrapper to ANSI prototype. This makes us C99 conforming. Notes: svn path=/head/; revision=85421
1994-05-24BSD 4.4 Lite Include SourcesRodney W. Grimes
Notes: svn path=/head/; revision=1539