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

`TYPE_IS_INTEGER (`

is an arithmetic constant
expression that is 1 if the arithmetic type `t`)`t` is an integer type.
`_Bool`

counts as an integer type.

`TYPE_SIGNED (`

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

is an integer constant expression.
`t`)

`EXPR_SIGNED (`

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

is likewise. Although `e`)`e` is
evaluated, if `e` is free of side effects then ```
EXPR_SIGNED
(
```

is typically optimized to a constant.
`e`)

Example usage:

#include <intprops.h> #include <time.h> enum { time_t_is_signed_integer = TYPE_IS_INTEGER (time_t) && TYPE_SIGNED (time_t) }; int CLOCKS_PER_SEC_is_signed (void) { return EXPR_SIGNED (CLOCKS_PER_SEC); }