aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/_Maxof.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2025-12-01 19:16:44 +0100
committerAlejandro Colomar <alx@kernel.org>2025-12-01 22:21:35 +0100
commita3f3dcca676b7716f9fbc3d1cd66168209e433fb (patch)
treea74269b1cf3b87b3598ac1ba41c53bf64c7725dc /man/man3/_Maxof.3
parentef4a2c425c62b26bd5d8b2c9b6a80d9987159038 (diff)
downloadman-pages-a3f3dcca676b7716f9fbc3d1cd66168209e433fb.tar.gz
man/man3/_Maxof.3: Add page
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/_Maxof.3')
-rw-r--r--man/man3/_Maxof.351
1 files changed, 51 insertions, 0 deletions
diff --git a/man/man3/_Maxof.3 b/man/man3/_Maxof.3
new file mode 100644
index 0000000000..ed0547d66d
--- /dev/null
+++ b/man/man3/_Maxof.3
@@ -0,0 +1,51 @@
+.\" Copyright, the authors of the Linux man-pages project
+.\"
+.\" SPDX-License-Identifier: Linux-man-pages-copyleft
+.\"
+.TH _Maxof 3 (date) "Linux man-pages (unreleased)"
+.SH NAME
+_Maxof, _Minof
+\-
+limits of an integer type
+.SH LIBRARY
+Standard C library
+.RI ( libc )
+.SH SYNOPSIS
+.nf
+.BI T\~_Maxof(typename\~ T );
+.BI T\~_Minof(typename\~ T );
+.fi
+.SH DESCRIPTION
+These operators return
+the maximum or minimum representable value
+of the operand integer type.
+.P
+If the operand is not an integer type,
+it produces a compilation error.
+.SH RETURN VALUE
+The maximum or minimum representable value
+of the operand integer type.
+.P
+The result is an integer constant expression
+of the same type as the operand.
+.SH STANDARDS
+GNU.
+.SH HISTORY
+gcc 16.
+.SH EXAMPLES
+.\" SRC BEGIN (maxof.c)
+.EX
+#include <assert.h>
+#include <limits.h>
+#include <stdlib.h>
+\&
+int
+main(void)
+{
+ static_assert(_Maxof(long) == LONG_MAX);
+ exit(EXIT_SUCCESS);
+}
+.EE
+.\" SRC END
+.SH SEE ALSO
+.BR operator (7)