From c3c29f2b0c9e091d8c296d1ea9f6f269b70a04c7 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Thu, 8 May 2025 12:29:59 +0200 Subject: [PATCH] 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 --- man/man3/assert.3 | 5 +++-- man/man3/static_assert.3 | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) 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 -- 2.47.2