The arithmetic types are the integer types and the floating-point types.
Arithmetic types are required as the operands of the following operators:
- multiplicative-expression
multiplicative-expression * cast-expressionmultiplicative-expression / cast-expression- unary-expression
unary-operator cast-expression- unary-operator
+-- assignment-expression
unary-expression assignment-operator assignment-expression- assignment-operator
*=/=
When both operands are of arithmetic types, several operators promote their operands to a more capable type, which is then the type of the result.
[: Much
more to be said! And current text does not fit new
context.]
The following types are guaranteed to be arithmetic; some are variations or aliases of others, and other, non-standard types may exist:
_Boolatomic_bool atomic_char atomic_char16_t atomic_char32_t atomic_int atomic_int_ fast16_t atomic_int_ fast32_t atomic_int_ fast64_t atomic_int_ fast8_t atomic_int_ least16_t atomic_int_ least32_t atomic_int_ least64_t atomic_int_ least8_t atomic_intmax_t atomic_intptr_t atomic_llong atomic_long atomic_ptrdiff_t atomic_schar atomic_short atomic_size_t atomic_uchar atomic_uint atomic_uint_ fast16_t atomic_uint_ fast32_t atomic_uint_ fast64_t atomic_uint_ fast8_t atomic_uint_ least16_t atomic_uint_ least32_t atomic_uint_ least64_t atomic_uint_ least8_t atomic_uintmax_t atomic_uintptr_t atomic_ullong atomic_ulong atomic_ushort boolcharclock_tdoubledouble _Complexdouble _Imaginarydouble complexdouble imaginarydouble_terrno_tfloatfloat _Complexfloat _Imaginaryfloat complexfloat imaginaryfloat_tintint16_tint32_tint64_tint8_tint_fast16_t int_fast32_t int_fast64_t int_fast8_t int_least16_t int_least32_t int_least64_t int_least8_t intmax_tintptr_tlonglong doublelong double _Complexlong double _Imaginarylong double complexlong double imaginarylong longptrdiff_trsize_tshortsig_atomic_t signed charsize_ttime_tuint16_tuint32_tuint64_tuint8_tuint_fast16_t uint_fast32_t uint_fast64_t uint_fast8_t uint_least16_t uint_least32_t uint_least64_t uint_least8_t uintmax_tuintptr_tunsignedunsigned charunsigned longunsigned long longunsigned shortwchar_twint_t