_Maxof(3) Library Functions Manual _Maxof(3)

_Maxof, _Minof - limits of an integer type

Standard C library (libc)

T _Maxof(typename T);
T _Minof(typename T);

These operators return the maximum or minimum representable value of the operand integer type.

If the operand is not an integer type, it produces a compilation error.

The maximum or minimum representable value of the operand integer type.

The result is an integer constant expression of the same type as the operand.

GNU.

gcc 16.

#include <assert.h>
#include <limits.h>
#include <stdlib.h>
int
main(void)
{
	static_assert(_Maxof(long) == LONG_MAX);
	exit(EXIT_SUCCESS);
}

operator(7)

2025-12-01 Linux man-pages (unreleased)

Different Versions of this Page: