Next: Integer Bounds, Up: Integer Properties [Contents][Index]

`TYPE_IS_INTEGER (`

is an arithmetic constant
expression that yields 1 if the arithmetic type `t`)`t` is an integer type,
0 otherwise.
`bool`

counts as an integer type.

`TYPE_SIGNED (`

is an arithmetic constant expression
that yields 1 if the real type `t`)`t` is a signed integer type or a
floating type, 0 otherwise.
If `t` is an integer type, `TYPE_SIGNED (`

is an integer constant expression.
`t`)

`EXPR_SIGNED (`

yields 1 if the real expression `e`)`e`
has a signed integer type or a floating type, 0 otherwise. If `e` is an
integer constant expression or an arithmetic constant expression,
`EXPR_SIGNED (`

is likewise. The expression
`e`)`e` is not evaluated, and ```
EXPR_SIGNED
(
```

is typically optimized to a constant.
`e`)

Example usage:

#include <intprops.h> #include <sys/types.h> enum { clock_t_is_integer = TYPE_IS_INTEGER (clock_t), uid_t_is_signed = TYPE_SIGNED (uid_t) }; int CLOCKS_PER_SEC_is_signed (void) { return EXPR_SIGNED (CLOCKS_PER_SEC); }