diff --git a/clang/docs/LanguageExtensions.rst b/clang/docs/LanguageExtensions.rst --- a/clang/docs/LanguageExtensions.rst +++ b/clang/docs/LanguageExtensions.rst @@ -2403,6 +2403,22 @@ Support for constant expression evaluation for the above builtins can be detected with ``__has_feature(cxx_constexpr_string_builtins)``. +stdio.h builtins +---------------- +Clang provides support for builtins forms of the following functions from the C +standard library headers ````: +* ``fprintf`` +* ``fscanf`` +* ``printf`` +* ``putchar`` +* ``puts`` +* ``scanf`` +* ``sprintf`` +* ``sscanf`` +* ``vfprintf`` +* ``vprintf`` +* ``vsprintf`` + Memory builtins --------------- diff --git a/clang/include/clang/Basic/Builtins.def b/clang/include/clang/Basic/Builtins.def --- a/clang/include/clang/Basic/Builtins.def +++ b/clang/include/clang/Basic/Builtins.def @@ -484,7 +484,24 @@ BUILTIN(__builtin_bcmp, "ivC*vC*z", "Fn") BUILTIN(__builtin_bcopy, "vv*v*z", "n") BUILTIN(__builtin_bzero, "vv*z", "nF") +BUILTIN(__builtin_calloc, "v*zz", "F") +BUILTIN(__builtin_exit, "vi", "Fr") BUILTIN(__builtin_fprintf, "iP*cC*.", "Fp:1:") +BUILTIN(__builtin_fputs, "icC*P*", "F") +BUILTIN(__builtin_free, "vv*", "F") +BUILTIN(__builtin_fscanf, "iP*RcC*R.", "Fs:1:") +BUILTIN(__builtin_isalnum, "ii", "FnU") +BUILTIN(__builtin_isalpha, "ii", "FnU") +BUILTIN(__builtin_iscntrl, "ii", "FnU") +BUILTIN(__builtin_isdigit, "ii", "FnU") +BUILTIN(__builtin_isgraph, "ii", "FnU") +BUILTIN(__builtin_islower, "ii", "FnU") +BUILTIN(__builtin_isprint, "ii", "FnU") +BUILTIN(__builtin_ispunct, "ii", "FnU") +BUILTIN(__builtin_isspace, "ii", "FnU") +BUILTIN(__builtin_isupper, "ii", "FnU") +BUILTIN(__builtin_isxdigit, "ii", "FnU") +BUILTIN(__builtin_malloc, "v*z", "F") BUILTIN(__builtin_memchr, "v*vC*iz", "nF") BUILTIN(__builtin_memcmp, "ivC*vC*z", "nF") BUILTIN(__builtin_memcpy, "v*v*vC*z", "nF") @@ -493,6 +510,12 @@ BUILTIN(__builtin_mempcpy, "v*v*vC*z", "nF") BUILTIN(__builtin_memset, "v*v*iz", "nF") BUILTIN(__builtin_printf, "icC*.", "Fp:0:") +BUILTIN(__builtin_putchar, "ii", "F") +BUILTIN(__builtin_puts, "icC*", "nF") +BUILTIN(__builtin_realloc, "v*v*z", "F") +BUILTIN(__builtin_scanf, "icC*R.", "Fs:0:") +BUILTIN(__builtin_sscanf, "icC*RcC*R.", "Fs:1:") +BUILTIN(__builtin_sprintf, "ic*cC*.", "Fp:1:") BUILTIN(__builtin_stpcpy, "c*c*cC*", "nF") BUILTIN(__builtin_stpncpy, "c*c*cC*z", "nF") BUILTIN(__builtin_strcasecmp, "icC*cC*", "nF") @@ -512,6 +535,8 @@ BUILTIN(__builtin_strrchr, "c*cC*i", "nF") BUILTIN(__builtin_strspn, "zcC*cC*", "nF") BUILTIN(__builtin_strstr, "c*cC*cC*", "nF") +BUILTIN(__builtin_tolower, "ii", "FnU") +BUILTIN(__builtin_toupper, "ii", "FnU") BUILTIN(__builtin_wcschr, "w*wC*w", "nF") BUILTIN(__builtin_wcscmp, "iwC*wC*", "nF") BUILTIN(__builtin_wcslen, "zwC*", "nF") @@ -529,8 +554,10 @@ BUILTIN(__builtin_unwind_init, "v", "") BUILTIN(__builtin_eh_return_data_regno, "iIi", "nc") BUILTIN(__builtin_snprintf, "ic*zcC*.", "nFp:2:") -BUILTIN(__builtin_vsprintf, "ic*cC*a", "nFP:1:") +BUILTIN(__builtin_vfprintf, "iP*cC*a", "FP:1:") +BUILTIN(__builtin_vprintf, "icC*a", "FP:0:") BUILTIN(__builtin_vsnprintf, "ic*zcC*a", "nFP:2:") +BUILTIN(__builtin_vsprintf, "ic*cC*a", "nFP:1:") BUILTIN(__builtin_thread_pointer, "v*", "nc") BUILTIN(__builtin_launder, "v*v*", "nt") LANGBUILTIN(__builtin_is_constant_evaluated, "b", "n", CXX_LANG) @@ -908,6 +935,7 @@ LIBBUILTIN(calloc, "v*zz", "f", "stdlib.h", ALL_LANGUAGES) LIBBUILTIN(exit, "vi", "fr", "stdlib.h", ALL_LANGUAGES) LIBBUILTIN(_Exit, "vi", "fr", "stdlib.h", ALL_LANGUAGES) +LIBBUILTIN(free, "vv*", "f", "stdlib.h", ALL_LANGUAGES) LIBBUILTIN(malloc, "v*z", "f", "stdlib.h", ALL_LANGUAGES) LIBBUILTIN(realloc, "v*v*z", "f", "stdlib.h", ALL_LANGUAGES) LIBBUILTIN(strtod, "dcC*c**", "f", "stdlib.h", ALL_LANGUAGES) @@ -942,6 +970,9 @@ // C99 stdio.h // FIXME: This list is incomplete. LIBBUILTIN(printf, "icC*.", "fp:0:", "stdio.h", ALL_LANGUAGES) +LIBBUILTIN(putchar, "ii", "f", "stdio.h", ALL_LANGUAGES) +LIBBUILTIN(puts, "icC*", "f", "stdio.h", ALL_LANGUAGES) +LIBBUILTIN(fputs, "icC*P*", "f", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(fprintf, "iP*cC*.", "fp:1:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(snprintf, "ic*zcC*.", "fp:2:", "stdio.h", ALL_LANGUAGES) LIBBUILTIN(sprintf, "ic*cC*.", "fp:1:", "stdio.h", ALL_LANGUAGES) diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -345,7 +345,7 @@ Ident_Pragma = RegisterBuiltinMacro(*this, "_Pragma"); // C++ Standing Document Extensions. - if (LangOpts.CPlusPlus) + if (getLangOpts().CPlusPlus) Ident__has_cpp_attribute = RegisterBuiltinMacro(*this, "__has_cpp_attribute"); else @@ -357,7 +357,7 @@ Ident__TIMESTAMP__ = RegisterBuiltinMacro(*this, "__TIMESTAMP__"); // Microsoft Extensions. - if (LangOpts.MicrosoftExt) { + if (getLangOpts().MicrosoftExt) { Ident__identifier = RegisterBuiltinMacro(*this, "__identifier"); Ident__pragma = RegisterBuiltinMacro(*this, "__pragma"); } else { @@ -371,7 +371,7 @@ Ident__has_extension = RegisterBuiltinMacro(*this, "__has_extension"); Ident__has_builtin = RegisterBuiltinMacro(*this, "__has_builtin"); Ident__has_attribute = RegisterBuiltinMacro(*this, "__has_attribute"); - if (!LangOpts.CPlusPlus) + if (!getLangOpts().CPlusPlus) Ident__has_c_attribute = RegisterBuiltinMacro(*this, "__has_c_attribute"); else Ident__has_c_attribute = nullptr; @@ -389,7 +389,7 @@ // Modules. Ident__building_module = RegisterBuiltinMacro(*this, "__building_module"); - if (!LangOpts.CurrentModule.empty()) + if (!getLangOpts().CurrentModule.empty()) Ident__MODULE__ = RegisterBuiltinMacro(*this, "__MODULE__"); else Ident__MODULE__ = nullptr; @@ -889,8 +889,8 @@ // Empty arguments are standard in C99 and C++0x, and are supported as an // extension in other modes. - if (ArgTokens.size() == ArgTokenStart && !LangOpts.C99) - Diag(Tok, LangOpts.CPlusPlus11 ? + if (ArgTokens.size() == ArgTokenStart && !getLangOpts().C99) + Diag(Tok, getLangOpts().CPlusPlus11 ? diag::warn_cxx98_compat_empty_fnmacro_arg : diag::ext_empty_fnmacro_arg); @@ -1628,7 +1628,6 @@ [this](Token &Tok, bool &HasLexedNextToken) -> int { IdentifierInfo *II = ExpectFeatureIdentifierInfo(Tok, *this, diag::err_feature_check_malformed); - const LangOptions &LangOpts = getLangOpts(); if (!II) return false; else if (II->getBuiltinID() != 0) { @@ -1664,8 +1663,8 @@ } else { return llvm::StringSwitch(II->getName()) // Report builtin templates as being builtins. - .Case("__make_integer_seq", LangOpts.CPlusPlus) - .Case("__type_pack_element", LangOpts.CPlusPlus) + .Case("__make_integer_seq", getLangOpts().CPlusPlus) + .Case("__type_pack_element", getLangOpts().CPlusPlus) // Likewise for some builtin preprocessor macros. // FIXME: This is inconsistent; we usually suggest detecting // builtin macros via #ifdef. Don't add more cases here. diff --git a/clang/test/CXX/over/over.oper/over.literal/p7.cpp b/clang/test/CXX/over/over.oper/over.literal/p7.cpp --- a/clang/test/CXX/over/over.oper/over.literal/p7.cpp +++ b/clang/test/CXX/over/over.oper/over.literal/p7.cpp @@ -7,7 +7,7 @@ static_assert(operator "" _a("foo") == 'f', ""); -void puts(const char *); +int puts(const char *); static inline void operator "" _puts(const char *c) { puts(c); } diff --git a/clang/test/CodeGen/builtins.c b/clang/test/CodeGen/builtins.c --- a/clang/test/CodeGen/builtins.c +++ b/clang/test/CodeGen/builtins.c @@ -96,7 +96,8 @@ V(strrchr, (s0, s1[0])); V(strcpy, (s0, s1)); V(strncpy, (s0, s1, n)); - + V(puts, (s1)); + // Object size checking V(__memset_chk, (s0, 0, sizeof s0, n)); V(__memcpy_chk, (s0, s1, sizeof s0, n)); diff --git a/clang/test/Preprocessor/has_builtin.c b/clang/test/Preprocessor/has_builtin.c new file mode 100644 --- /dev/null +++ b/clang/test/Preprocessor/has_builtin.c @@ -0,0 +1,445 @@ +// RUN: %clang_cc1 -verify -E %s +// expected-no-diagnostics + +// TODO: fill out this file +// Please sort by https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html. + +// ISO C90 +#if !__has_builtin(abort) +#warning "no builtin 'abort'" +#endif +#if !__has_builtin(__builtin_abort) +#warning "no builtin '__builtin_abort'" +#endif +#if !__has_builtin(abs) +#warning "no builtin 'abs'" +#endif +#if !__has_builtin(__builtin_abs) +#warning "no builtin '__builtin_abs'" +#endif +#if !__has_builtin(acos) +#warning "no builtin 'acos'" +#endif +#if !__has_builtin(__builtin_acos) +#warning "no builtin '__builtin_acos'" +#endif +#if !__has_builtin(asin) +#warning "no builtin 'asin'" +#endif +#if !__has_builtin(__builtin_asin) +#warning "no builtin '__builtin_asin'" +#endif +#if !__has_builtin(atan2) +#warning "no builtin 'atan2'" +#endif +#if !__has_builtin(__builtin_atan2) +#warning "no builtin '__builtin_atan2'" +#endif +#if !__has_builtin(atan) +#warning "no builtin 'atan'" +#endif +#if !__has_builtin(__builtin_atan) +#warning "no builtin '__builtin_atan'" +#endif +#if !__has_builtin(calloc) +#warning "no builtin 'calloc'" +#endif +#if !__has_builtin(__builtin_calloc) +#warning "no builtin '__builtin_calloc'" +#endif +#if !__has_builtin(ceil) +#warning "no builtin 'ceil'" +#endif +#if !__has_builtin(__builtin_ceil) +#warning "no builtin '__builtin_ceil'" +#endif +#if !__has_builtin(cosh) +#warning "no builtin 'cosh'" +#endif +#if !__has_builtin(__builtin_cosh) +#warning "no builtin '__builtin_cosh'" +#endif +#if !__has_builtin(cos) +#warning "no builtin 'cos'" +#endif +#if !__has_builtin(__builtin_cos) +#warning "no builtin '__builtin_cos'" +#endif +#if !__has_builtin(exit) +#warning "no builtin 'exit'" +#endif +#if !__has_builtin(__builtin_exit) +#warning "no builtin '__builtin_exit'" +#endif +#if !__has_builtin(exp) +#warning "no builtin 'exp'" +#endif +#if !__has_builtin(__builtin_exp) +#warning "no builtin '__builtin_exp'" +#endif +#if !__has_builtin(fabs) +#warning "no builtin 'fabs'" +#endif +#if !__has_builtin(__builtin_fabs) +#warning "no builtin '__builtin_fabs'" +#endif +#if !__has_builtin(floor) +#warning "no builtin 'floor'" +#endif +#if !__has_builtin(__builtin_floor) +#warning "no builtin '__builtin_floor'" +#endif +#if !__has_builtin(fmod) +#warning "no builtin 'fmod'" +#endif +#if !__has_builtin(__builtin_fmod) +#warning "no builtin '__builtin_fmod'" +#endif +#if !__has_builtin(fprintf) +#warning "no builtin 'fprintf'" +#endif +#if !__has_builtin(__builtin_fprintf) +#warning "no builtin '__builtin_fprintf'" +#endif +#if !__has_builtin(fputs) +#warning "no builtin 'fputs'" +#endif +#if !__has_builtin(__builtin_fputs) +#warning "no builtin '__builtin_fputs'" +#endif +#if !__has_builtin(free) +#warning "no builtin 'free'" +#endif +#if !__has_builtin(__builtin_free) +#warning "no builtin '__builtin_free'" +#endif +#if !__has_builtin(frexp) +#warning "no builtin 'frexp'" +#endif +#if !__has_builtin(__builtin_frexp) +#warning "no builtin '__builtin_frexp'" +#endif +#if !__has_builtin(fscanf) +#warning "no builtin 'fscanf'" +#endif +#if !__has_builtin(__builtin_fscanf) +#warning "no builtin '__builtin_fscanf'" +#endif +#if !__has_builtin(isalnum) +#warning "no builtin 'isalnum'" +#endif +#if !__has_builtin(__builtin_isalnum) +#warning "no builtin '__builtin_isalnum'" +#endif +#if !__has_builtin(isalpha) +#warning "no builtin 'isalpha'" +#endif +#if !__has_builtin(__builtin_isalpha) +#warning "no builtin '__builtin_isalpha'" +#endif +#if !__has_builtin(iscntrl) +#warning "no builtin 'iscntrl'" +#endif +#if !__has_builtin(__builtin_iscntrl) +#warning "no builtin '__builtin_iscntrl'" +#endif +#if !__has_builtin(isdigit) +#warning "no builtin 'isdigit'" +#endif +#if !__has_builtin(__builtin_isdigit) +#warning "no builtin '__builtin_isdigit'" +#endif +#if !__has_builtin(isgraph) +#warning "no builtin 'isgraph'" +#endif +#if !__has_builtin(__builtin_isgraph) +#warning "no builtin '__builtin_isgraph'" +#endif +#if !__has_builtin(islower) +#warning "no builtin 'islower'" +#endif +#if !__has_builtin(__builtin_islower) +#warning "no builtin '__builtin_islower'" +#endif +#if !__has_builtin(isprint) +#warning "no builtin 'isprint'" +#endif +#if !__has_builtin(__builtin_isprint) +#warning "no builtin '__builtin_isprint'" +#endif +#if !__has_builtin(ispunct) +#warning "no builtin 'ispunct'" +#endif +#if !__has_builtin(__builtin_ispunct) +#warning "no builtin '__builtin_ispunct'" +#endif +#if !__has_builtin(isspace) +#warning "no builtin 'isspace'" +#endif +#if !__has_builtin(__builtin_isspace) +#warning "no builtin '__builtin_isspace'" +#endif +#if !__has_builtin(isupper) +#warning "no builtin 'isupper'" +#endif +#if !__has_builtin(__builtin_isupper) +#warning "no builtin '__builtin_isupper'" +#endif +#if !__has_builtin(isxdigit) +#warning "no builtin 'isxdigit'" +#endif +#if !__has_builtin(__builtin_isxdigit) +#warning "no builtin '__builtin_isxdigit'" +#endif +#if !__has_builtin(tolower) +#warning "no builtin 'tolower'" +#endif +#if !__has_builtin(__builtin_tolower) +#warning "no builtin '__builtin_tolower'" +#endif +#if !__has_builtin(toupper) +#warning "no builtin 'toupper'" +#endif +#if !__has_builtin(__builtin_toupper) +#warning "no builtin '__builtin_toupper'" +#endif +#if !__has_builtin(labs) +#warning "no builtin 'labs'" +#endif +#if !__has_builtin(__builtin_labs) +#warning "no builtin '__builtin_labs'" +#endif +#if !__has_builtin(ldexp) +#warning "no builtin 'ldexp'" +#endif +#if !__has_builtin(__builtin_ldexp) +#warning "no builtin '__builtin_ldexp'" +#endif +#if !__has_builtin(log10) +#warning "no builtin 'log10'" +#endif +#if !__has_builtin(__builtin_log10) +#warning "no builtin '__builtin_log10'" +#endif +#if !__has_builtin(log) +#warning "no builtin 'log'" +#endif +#if !__has_builtin(__builtin_log) +#warning "no builtin '__builtin_log'" +#endif +#if !__has_builtin(malloc) +#warning "no builtin 'malloc'" +#endif +#if !__has_builtin(__builtin_malloc) +#warning "no builtin '__builtin_malloc'" +#endif +#if !__has_builtin(memchr) +#warning "no builtin 'memchr'" +#endif +#if !__has_builtin(__builtin_memchr) +#warning "no builtin '__builtin_memchr'" +#endif +#if !__has_builtin(memcmp) +#warning "no builtin 'memcmp'" +#endif +#if !__has_builtin(__builtin_memcmp) +#warning "no builtin '__builtin_memcmp'" +#endif +#if !__has_builtin(memcpy) +#warning "no builtin 'memcpy'" +#endif +#if !__has_builtin(__builtin_memcpy) +#warning "no builtin '__builtin_memcpy'" +#endif +#if !__has_builtin(memset) +#warning "no builtin 'memset'" +#endif +#if !__has_builtin(__builtin_memset) +#warning "no builtin '__builtin_memset'" +#endif +#if !__has_builtin(modf) +#warning "no builtin 'modf'" +#endif +#if !__has_builtin(__builtin_modf) +#warning "no builtin '__builtin_modf'" +#endif +#if !__has_builtin(pow) +#warning "no builtin 'pow'" +#endif +#if !__has_builtin(__builtin_pow) +#warning "no builtin '__builtin_pow'" +#endif +#if !__has_builtin(printf) +#warning "no builtin 'printf'" +#endif +#if !__has_builtin(__builtin_printf) +#warning "no builtin '__builtin_printf'" +#endif +#if !__has_builtin(putchar) +#warning "no builtin 'putchar'" +#endif +#if !__has_builtin(__builtin_putchar) +#warning "no builtin '__builtin_putchar'" +#endif +#if !__has_builtin(puts) +#warning "no builtin 'puts'" +#endif +#if !__has_builtin(__builtin_puts) +#warning "no builtin '__builtin_puts'" +#endif +#if !__has_builtin(realloc) +#warning "no builtin 'realloc'" +#endif +#if !__has_builtin(__builtin_realloc) +#warning "no builtin '__builtin_realloc'" +#endif +#if !__has_builtin(scanf) +#warning "no builtin 'scanf'" +#endif +#if !__has_builtin(__builtin_scanf) +#warning "no builtin '__builtin_scanf'" +#endif +#if !__has_builtin(sinh) +#warning "no builtin 'sinh'" +#endif +#if !__has_builtin(__builtin_sinh) +#warning "no builtin '__builtin_sinh'" +#endif +#if !__has_builtin(sin) +#warning "no builtin 'sin'" +#endif +#if !__has_builtin(__builtin_sin) +#warning "no builtin '__builtin_sin'" +#endif +#if !__has_builtin(snprintf) +#warning "no builtin 'snprintf'" +#endif +#if !__has_builtin(__builtin_snprintf) +#warning "no builtin '__builtin_snprintf'" +#endif +#if !__has_builtin(sprintf) +#warning "no builtin 'sprintf'" +#endif +#if !__has_builtin(__builtin_sprintf) +#warning "no builtin '__builtin_sprintf'" +#endif +#if !__has_builtin(sqrt) +#warning "no builtin 'sqrt'" +#endif +#if !__has_builtin(__builtin_sqrt) +#warning "no builtin '__builtin_sqrt'" +#endif +#if !__has_builtin(sscanf) +#warning "no builtin 'sscanf'" +#endif +#if !__has_builtin(__builtin_sscanf) +#warning "no builtin '__builtin_sscanf'" +#endif +#if !__has_builtin(strcat) +#warning "no builtin 'strcat'" +#endif +#if !__has_builtin(__builtin_strcat) +#warning "no builtin '__builtin_strcat'" +#endif +#if !__has_builtin(strchr) +#warning "no builtin 'strchr'" +#endif +#if !__has_builtin(__builtin_strchr) +#warning "no builtin '__builtin_strchr'" +#endif +#if !__has_builtin(strcmp) +#warning "no builtin 'strcmp'" +#endif +#if !__has_builtin(__builtin_strcmp) +#warning "no builtin '__builtin_strcmp'" +#endif +#if !__has_builtin(strcpy) +#warning "no builtin 'strcpy'" +#endif +#if !__has_builtin(__builtin_strcpy) +#warning "no builtin '__builtin_strcpy'" +#endif +#if !__has_builtin(strcspn) +#warning "no builtin 'strcspn'" +#endif +#if !__has_builtin(__builtin_strcspn) +#warning "no builtin '__builtin_strcspn'" +#endif +#if !__has_builtin(strlen) +#warning "no builtin 'strlen'" +#endif +#if !__has_builtin(__builtin_strlen) +#warning "no builtin '__builtin_strlen'" +#endif +#if !__has_builtin(strncat) +#warning "no builtin 'strncat'" +#endif +#if !__has_builtin(__builtin_strncat) +#warning "no builtin '__builtin_strncat'" +#endif +#if !__has_builtin(strncmp) +#warning "no builtin 'strncmp'" +#endif +#if !__has_builtin(__builtin_strncmp) +#warning "no builtin '__builtin_strncmp'" +#endif +#if !__has_builtin(strncpy) +#warning "no builtin 'strncpy'" +#endif +#if !__has_builtin(__builtin_strncpy) +#warning "no builtin '__builtin_strncpy'" +#endif +#if !__has_builtin(strpbrk) +#warning "no builtin 'strpbrk'" +#endif +#if !__has_builtin(__builtin_strpbrk) +#warning "no builtin '__builtin_strpbrk'" +#endif +#if !__has_builtin(strrchr) +#warning "no builtin 'strrchr'" +#endif +#if !__has_builtin(__builtin_strrchr) +#warning "no builtin '__builtin_strrchr'" +#endif +#if !__has_builtin(strspn) +#warning "no builtin 'strspn'" +#endif +#if !__has_builtin(__builtin_strspn) +#warning "no builtin '__builtin_strspn'" +#endif +#if !__has_builtin(strstr) +#warning "no builtin 'strstr'" +#endif +#if !__has_builtin(__builtin_strstr) +#warning "no builtin '__builtin_strstr'" +#endif +#if !__has_builtin(tanh) +#warning "no builtin 'tanh'" +#endif +#if !__has_builtin(__builtin_tanh) +#warning "no builtin '__builtin_tanh'" +#endif +#if !__has_builtin(tan) +#warning "no builtin 'tan'" +#endif +#if !__has_builtin(__builtin_tan) +#warning "no builtin '__builtin_tan'" +#endif +#if !__has_builtin(vfprintf) +#warning "no builtin 'vfprintf'" +#endif +#if !__has_builtin(__builtin_vfprintf) +#warning "no builtin '__builtin_vfprintf'" +#endif +#if !__has_builtin(vprintf) +#warning "no builtin 'vprintf'" +#endif +#if !__has_builtin(__builtin_vprintf) +#warning "no builtin '__builtin_vprintf'" +#endif +#if !__has_builtin(vsprintf) +#warning "no builtin 'vsprintf'" +#endif +#if !__has_builtin(__builtin_vsprintf) +#warning "no builtin '__builtin_vsprintf'" +#endif