From: Alejandro Colomar Date: Thu, 8 May 2025 10:29:59 +0000 (+0200) Subject: man/man3/[static_]assert.3: SYNOPSIS: Use 'bool' instead of 'scalar' X-Git-Tag: man-pages-6.14~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3c29f2b0c9e091d8c296d1ea9f6f269b70a04c7;p=thirdparty%2Fman-pages.git man/man3/[static_]assert.3: SYNOPSIS: Use 'bool' instead of 'scalar' The type _Bool perfectly models these APIs. Conversion from any scalar type to _Bool results in true if the value is non-zero, and false if it is zero. Signed-off-by: Alejandro Colomar --- diff --git a/man/man3/assert.3 b/man/man3/assert.3 index 9a08b07ea..bb7f5dfc3 100644 --- a/man/man3/assert.3 +++ b/man/man3/assert.3 @@ -13,7 +13,7 @@ Standard C library .nf .B #include .P -.BI "void assert(scalar " expression ); +.BI "void assert(bool " expression ); .fi .SH DESCRIPTION This macro can help programmers find bugs in their programs, @@ -76,7 +76,8 @@ In C89, .I expression is required to be of type .I int -and undefined behavior results if it is not, but in C99 +and undefined behavior results if it is not, +but in C99 it may have any scalar type. .\" See Defect Report 107 for more details. .SH BUGS diff --git a/man/man3/static_assert.3 b/man/man3/static_assert.3 index ca79ce07e..47c497bff 100644 --- a/man/man3/static_assert.3 +++ b/man/man3/static_assert.3 @@ -12,10 +12,10 @@ Standard C library .nf .B #include .P -.BI "void static_assert(scalar " constant-expression ", const char *" msg ); +.BI "void static_assert(bool " constant-expression ", const char *" msg ); .P /* Since C23: */ -.BI "void static_assert(scalar " constant-expression ); +.BI "void static_assert(bool " constant-expression ); .fi .SH DESCRIPTION This macro is similar to