Skip to main content

IAR Embedded Workbench for RL78 5.20

Supported GCC built-in functions

In this section:

The IAR C/C++ Compiler also supports a limited selection of GCC-style built-in functions.

The following functions are supported. For more information, see the GCC documentation.

__builtin_add_overflow. The IAR implementation only accepts parameters that refer to parameters of the same type as the type pointed to by the last (output) parameter, or constants that can be converted to the same type without loss. In this respect, it differs from the GCC implementation.
__builtin_bswap16
__builtin_bswap32
__builtin_bswap64
__builtin_clz
__builtin_clzl
__builtin_clzll
__builtin_constant_p. Note that the function gives the same result regardless of the optimization level, and that the function might return 0 even though the expression is later treated as a compile-time constant by the compiler. In these respects, the function does not behave like the GCC function.
__builtin_ctz
__builtin_ctzl
__builtin_ctzll
__builtin_expect (recognized but has no effect)
__builtin_ffs
__builtin_ffsl
__builtin_ffsll
__builtin_huge_val
__builtin_huge_valf
__builtin_huge_vall
__builtin_inf
__builtin_inff
__builtin_infl
__builtin_mul_overflow. The IAR implementation only accepts parameters that refer to parameters of the same type as the type pointed to by the last (output) parameter, or constants that can be converted to the same type without loss. In this respect, it differs from the GCC implementation.
__builtin_nan
__builtin_nanf
__builtin_nanl
__builtin_nans
__builtin_nansf
__builtin_nansl
__builtin_popcount
__builtin_popcountl
__builtin_popcountll
__builtin_return_address. The function is supported, but redirected to the the intrinsic function __get_return_address, with the level parameter discarded.
__builtin_sadd_overflow
__builtin_saddl_overflow
__builtin_saddll_overflow
__builtin_sub_overflow. The IAR implementation only accepts parameters that refer to parameters of the same type as the type pointed to by the last (output) parameter, or constants that can be converted to the same type without loss. In this respect, it differs from the GCC implementation.
__builtin_uadd_overflow
__builtin_uaddl_overflow
__builtin_uaddll_overflow
__builtin_ssub_overflow
__builtin_ssubl_overflow
__builtin_ssubll_overflow
__builtin_usub_overflow
__builtin_usubl_overflow
__builtin_usubll_overflow
__builtin_smul_overflow
__builtin_smull_overflow
__builtin_smulll_overflow
__builtin_types_compatible_p
__builtin_umul_overflow
__builtin_umull_overflow
__builtin_umulll_overflow
__builtin_unreachable

The following functions are supported, but redirect to the corresponding standard library functions:

__builtin_acos
__builtin_acosf
__builtin_acosh
__builtin_acoshf
__builtin_acoshl
__builtin_acosl
__builtin_asin
__builtin_asinf
__builtin_asinh
__builtin_asinhf
__builtin_asinhl
__builtin_asinl
__builtin_atan
__builtin_atan2
__builtin_atan2f
__builtin_atan2l
__builtin_atanf
__builtin_atanh
__builtin_atanhf
__builtin_atanhl
__builtin_atanl
__builtin_cbrt
__builtin_cbrtf
__builtin_cbrtl
__builtin_ceil
__builtin_ceilf
__builtin_ceill
__builtin_copysign
__builtin_copysignf
__builtin_copysignl
__builtin_cos
__builtin_cosf
__builtin_cosh
__builtin_coshf
__builtin_coshl
__builtin_cosl
__builtin_erf
__builtin_erfc
__builtin_erfcf
__builtin_erfcl
__builtin_erff
__builtin_erfl
__builtin_exp
__builtin_exp2
__builtin_exp2f
__builtin_exp2l
__builtin_expf
__builtin_expl
__builtin_expm1
__builtin_expm1f
__builtin_expm1l
__builtin_fabs
__builtin_fabsf
__builtin_fabsl
__builtin_fdim
__builtin_fdimf
__builtin_fdiml
__builtin_floor
__builtin_floorf
__builtin_floorl
__builtin_fma
__builtin_fmaf
__builtin_fmal
__builtin_fmax
__builtin_fmaxf
__builtin_fmaxl
__builtin_fmin
__builtin_fminf
__builtin_fminl
__builtin_fmod
__builtin_fmodf
__builtin_fmodl
__builtin_frexp
__builtin_frexpf
__builtin_frexpl
__builtin_hypot
__builtin_hypotf
__builtin_hypotl
__builtin_ldexp
__builtin_ldexpf
__builtin_ldexpl
__builtin_lgamma
__builtin_lgammaf
__builtin_lgammal
__builtin_llrint
__builtin_llrintf
__builtin_llrintl
__builtin_llround
__builtin_llroundf
__builtin_llroundl
__builtin_log
__builtin_log10
__builtin_log10f
__builtin_log10l
__builtin_log1p
__builtin_log1pf
__builtin_log1pl
__builtin_log2
__builtin_log2f
__builtin_log2l
__builtin_logb
__builtin_logbf
__builtin_logbl
__builtin_logf
__builtin_logl
__builtin_lrint
__builtin_lrintf
__builtin_lrintl
__builtin_lround
__builtin_lroundf
__builtin_lroundl
__builtin_memcmp
__builtin_memmove
__builtin_modf
__builtin_modff
__builtin_modfl
__builtin_nearbyint
__builtin_nearbyintf
__builtin_nearbyintl
__builtin_nextafter
__builtin_nextafterf
__builtin_nextafterl
__builtin_nexttoward
__builtin_nexttowardf
__builtin_nexttowardl
__builtin_pow
__builtin_powf
__builtin_powl
__builtin_remainder
__builtin_remainderf
__builtin_remainderl
__builtin_remquo
__builtin_remquof
__builtin_remquol
__builtin_rint
__builtin_rintf
__builtin_rintl
__builtin_round
__builtin_roundf
__builtin_roundl
__builtin_scalbln
__builtin_scalblnf
__builtin_scalblnl
__builtin_scalbn
__builtin_scalbnf
__builtin_scalbnl
__builtin_sin
__builtin_sinf
__builtin_sinh
__builtin_sinhf
__builtin_sinhl
__builtin_sinl
__builtin_sqrt
__builtin_sqrtf
__builtin_sqrtl
__builtin_tan
__builtin_tanf
__builtin_tanh
__builtin_tanhf
__builtin_tanhl
__builtin_tanl
__builtin_tgamma
__builtin_tgammaf
__builtin_tgammal
__builtin_trunc
__builtin_truncf
__builtin_truncl