<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/include/assert.h, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>http://cgit.freebsd.org/src/atom?h=main</id>
<link rel='self' href='http://cgit.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<updated>2026-06-10T16:14:32Z</updated>
<entry>
<title>libc: Fix assert() sanitiser for C++ contextual bool conversion</title>
<updated>2026-06-10T16:14:32Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-06-06T11:38:47Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=48d20fd1cf90179e778c6155900cbed2be140273'/>
<id>urn:sha1:48d20fd1cf90179e778c6155900cbed2be140273</id>
<content type='text'>
Replace the `(bool(*)(bool))` probe in `__assert_sanitize()` with an unevaluated
conditional expression, so types with `explicit operator bool()` that require a
contextually converted constant expression of type `bool` are handled correctly.

Ergo, arity check is now performed separately via `__assert_sanitize_arity()`, a
unary template whose parameter pack must bind to exactly on argument after
`__VA_ARGS__` is substituted into the call.

Also align NDEBUG with C23 requirements.

Reported by:	dim, aokblast
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
Reviewed by:	aokblast, fuz
MFC after:	1 week
Fixes:		867b51452ea78ece0b312a387e63fdbc2a11056a
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2265
</content>
</entry>
<entry>
<title>assert.h: style(9): Space after #define, between #endif and comment</title>
<updated>2026-06-04T11:49:26Z</updated>
<author>
<name>Olivier Certner</name>
<email>olce@FreeBSD.org</email>
</author>
<published>2026-06-02T10:01:05Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7487932f4fbc5a71231d3b1fc93d160253f38c83'/>
<id>urn:sha1:7487932f4fbc5a71231d3b1fc93d160253f38c83</id>
<content type='text'>
style(9) still allows TAB after #define but this is a historical
artifact and by far the minority of uses cases.  Going forward, we would
like to promote the use of a single space, as it allows alignment to
survive line prefixing (such as in diffs).

style(9) also has prescribed a single space between '#else' or '#endif'
and a comment recalling the guard since 2002.

So, commit 157c184689ea ("assert.h: Remove leading tabs for whitespace
consistency") was good, and in line with rules about whitespace changes
(since the file was heavily modified by surrounding commits).

This commit is thus basically a revert of 439710cf003b ("assert.h:
Revert "Remove leading tabs for whitespace consistency"), which extended
replacing spaces with TABs in the code introduced in the meantime (after
commit 157c184689ea).

Reviewed by:    fuz, imp
Fixes:          439710cf003b ("assert.h: Revert "Remove leading tabs for whitespace consistency")
MAC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D57391
</content>
</entry>
<entry>
<title>assert.h: Revert "Remove leading tabs for whitespace consistency"</title>
<updated>2026-05-31T19:49:23Z</updated>
<author>
<name>Robert Clausecker</name>
<email>fuz@FreeBSD.org</email>
</author>
<published>2026-05-31T19:47:36Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=439710cf003b7849d2119e9a7694d7b27ab6d70f'/>
<id>urn:sha1:439710cf003b7849d2119e9a7694d7b27ab6d70f</id>
<content type='text'>
This reverts commit 157c184689ea3d7b8b6bd89aff849e94f004aa0e.

As per style(9), a tab goes after #define.  This should not have been
removed.

Reported by:	kib
Fixes:		157c184689ea3d7b8b6bd89aff849e94f004aa0e.
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2203
</content>
</entry>
<entry>
<title>libc: Add &lt;assert.h&gt; C23 feature test macro</title>
<updated>2026-05-30T13:43:52Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-05-17T20:39:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=0fe73dcf7c3260260afd95c3d1cfe846feb1df7c'/>
<id>urn:sha1:0fe73dcf7c3260260afd95c3d1cfe846feb1df7c</id>
<content type='text'>
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
Reviewed by:	fuz
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2203
</content>
</entry>
<entry>
<title>libc: Add variadic assert in accordance with C23</title>
<updated>2026-05-30T13:43:51Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-05-28T07:31:29Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=867b51452ea78ece0b312a387e63fdbc2a11056a'/>
<id>urn:sha1:867b51452ea78ece0b312a387e63fdbc2a11056a</id>
<content type='text'>
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
Reviewed by:	fuz
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2203
</content>
</entry>
<entry>
<title>assert.h: Remove leading tabs for whitespace consistency</title>
<updated>2026-05-30T13:43:51Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-05-28T07:17:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=157c184689ea3d7b8b6bd89aff849e94f004aa0e'/>
<id>urn:sha1:157c184689ea3d7b8b6bd89aff849e94f004aa0e</id>
<content type='text'>
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
Reviewed by:	fuz
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2203
</content>
</entry>
<entry>
<title>libc: Restrict the static_assert macro to pre-C23 modes</title>
<updated>2026-05-30T13:43:51Z</updated>
<author>
<name>Faraz Vahedi</name>
<email>kfv@kfv.io</email>
</author>
<published>2026-05-17T20:47:49Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c5c7d18d011830088a2134e1be32f610f1f3e797'/>
<id>urn:sha1:c5c7d18d011830088a2134e1be32f610f1f3e797</id>
<content type='text'>
Signed-off-by:	Faraz Vahedi &lt;kfv@kfv.io&gt;
Reviewed by:	fuz
MFC after:	1 month
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2203
</content>
</entry>
<entry>
<title>include: add a userland version of __assert_unreachable</title>
<updated>2025-01-13T00:41:37Z</updated>
<author>
<name>Kyle Evans</name>
<email>kevans@FreeBSD.org</email>
</author>
<published>2025-01-13T00:41:25Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=712f81feea416e9f8aaf040173883876a50a7d34'/>
<id>urn:sha1:712f81feea416e9f8aaf040173883876a50a7d34</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>include: Remove ancient SCCS tags.</title>
<updated>2023-11-27T05:23:28Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-11-23T17:21:37Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5a1d14419a5b620430949a46cb6ee63148a43cb9'/>
<id>urn:sha1:5a1d14419a5b620430949a46cb6ee63148a43cb9</id>
<content type='text'>
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
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line .h pattern</title>
<updated>2023-08-16T17:54:23Z</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:23Z</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=42b388439bd3795e09258c57a74ce9eec3651c7b'/>
<id>urn:sha1:42b388439bd3795e09258c57a74ce9eec3651c7b</id>
<content type='text'>
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/
</content>
</entry>
</feed>
