Other Builtins (The GNU D Compiler)

#### 2.2.3 Other Built-in Functions ¶

As well as built-ins being available from the `gcc.builtins` module, GNU D will also recognize when an `extern(C)` library function is a GCC built-in. Many of these functions are only optimized in certain cases; if they are not optimized in a particular case, a call to the library function is emitted. This optimization can be disabled with the `-fno-builtin` option (see Runtime Options).

In the `core.stdc.complex` module, the functions `cabs`, `cabsf`, `cabsl`, `cacos`, `cacosf`, `cacosh`, `cacoshf`, `cacoshl`, `cacosl`, `carg`, `cargf`, `cargl`, `casin`, `casinf`, `casinh`, `casinhf`, `casinhl`, `casinl`, `catan`, `catanf`, `catanh`, `catanhf`, `catanhl`, `catanl`, `ccos`, `ccosf`, `ccosh`, `ccoshf`, `ccoshl`, `ccosl`, `cexp`, `cexpf`, `cexpl`, `clog`, `clogf`, `clogl`, `conj`, `conjf`, `conjl`, `cpow`, `cpowf`, `cpowl`, `cproj`, `cprojf`, `cprojl`, `csin`, `csinf`, `csinh`, `csinhf`, `csinhl`, `csinl`, `csqrt`, `csqrtf`, `csqrtl`, `ctan`, `ctanf`, `ctanh`, `ctanhf`, `ctanhl`, `ctanl` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.ctype` module, the functions `isalnum`, `isalpha`, `isblank`, `iscntrl`, `isdigit`, `isgraph`, `islower`, `isprint`, `ispunct`, `isspace`, `isupper`, `isxdigit`, `tolower`, `toupper` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.fenv` module, the functions `feclearexcept`, `fegetenv`, `fegetexceptflag`, `fegetround`, `feholdexcept`, `feraiseexcept`, `fesetenv`, `fesetexceptflag`, `fesetround`, `fetestexcept`, `feupdateenv` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.inttypes` module, the function `imaxabs` may be handled as a built-in function. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.math` module, the functions `acos`, `acosf`, `acosh`, `acoshf`, `acoshl`, `acosl`, `asin`, `asinf`, `asinh`, `asinhf`, `asinhl`, `asinl`, `atan`, `atan2`, `atan2f`, `atan2l`, `atanf`, `atanh`, `atanhf`, `atanhl`, `atanl`, `cbrt`, `cbrtf`, `cbrtl`, `ceil`, `ceilf`, `ceill`, `copysign`, `copysignf`, `copysignl`, `cos`, `cosf`, `cosh`, `coshf`, `coshl`, `cosl`, `erf`, `erfc`, `erfcf`, `erfcl`, `erff`, `erfl`, `exp`, `exp2`, `exp2f`, `exp2l`, `expf`, `expl`, `expm1`, `expm1f`, `expm1l`, `fabs`, `fabsf`, `fabsl`, `fdim`, `fdimf`, `fdiml`, `floor`, `floorf`, `floorl`, `fma`, `fmaf`, `fmal`, `fmax`, `fmaxf`, `fmaxl`, `fmin`, `fminf`, `fminl`, `fmod`, `fmodf`, `fmodl`, `frexp`, `frexpf`, `frexpl`, `hypot`, `hypotf`, `hypotl`, `ilogb`, `ilogbf`, `ilogbl`, `isinf`, `isnan`, `ldexp`, `ldexpf`, `ldexpl`, `lgamma`, `lgammaf`, `lgammal`, `llrint`, `llrintf`, `llrintl`, `llround`, `llroundf`, `llroundl`, `log`, `log10`, `log10f`, `log10l`, `log1p`, `log1pf`, `log1pl`, `log2`, `log2f`, `log2l`, `logb`, `logbf`, `logbl`, `logf`, `logl`, `lrint`, `lrintf`, `lrintl`, `lround`, `lroundf`, `lroundl`, `modf`, `modff`, `modfl`, `nan`, `nanf`, `nanl`, `nearbyint`, `nearbyintf`, `nearbyintl`, `nextafter`, `nextafterf`, `nextafterl`, `nexttoward`, `nexttowardf`, `nexttowardl`, `pow`, `powf`, `powl`, `remainder`, `remainderf`, `remainderl`, `remquo`, `remquof`, `remquol`, `rint`, `rintf`, `rintl`, `round`, `roundf`, `roundl`, `scalbln`, `scalblnf`, `scalblnl`, `scalbn`, `scalbnf`, `scalbnl`, `signbit`, `sin`, `sinf`, `sinh`, `sinhf`, `sinhl`, `sinl`, `sqrt`, `sqrtf`, `sqrtl`, `tan`, `tanf`, `tanh`, `tanhf`, `tanhl`, `tanl`, `tgamma`, `tgammaf`, `tgammal`, `trunc`, `truncf`, `truncl` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.stdio` module, the functions `fprintf`, `fputc`, `fputc_unlocked`, `fputs`, `fwrite`, `printf`, `puts`, `snprintf`, `sprintf`, `vfprintf`, `vprintf`, `vsnprintf`, `vsprintf` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.stdlib` module, the functions `abort`, `abs`, `aligned_alloc`, `alloca`, `calloc`, `exit`, `_Exit`, `free`, `labs`, `llabs`, `malloc`, `realloc` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.string` module, the functions `memchr`, `memcmp`, `memcpy`, `memmove`, `memset`, `strcat`, `strchr`, `strcmp`, `strcpy`, `strcspn`, `strdup`, `strlen`, `strncat`, `strncmp`, `strncpy`, `strpbrk`, `strrchr`, `strspn`, `strstr` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.time` module, the function `strftime` may be handled as a built-in function. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

In the `core.stdc.wctype` module, the functions `iswalnum`, `iswalpha`, `iswblank`, `iswcntrl`, `iswdigit`, `iswgraph`, `iswlower`, `iswprint`, `iswpunct`, `iswspace`, `iswupper`, `iswxdigit`, `towlower`, `towupper` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.

Within the `core.sys` package for POSIX and platform definitions, the functions `putchar_unlocked`, `putc_unlocked`, `posix_memalign`, `ffs`, `strcasecmp`, `strncasecmp`, `stpcpy`, `stpncpy`, `strndup`, `strnlen`, `execl`, `execle`, `execlp`, `execv`, `execve`, `execvp`, `_exit`, `fork` may be handled as built-in functions. All these functions have corresponding versions prefixed with `__builtin_` in the `gcc.builtins` module.