//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // test #include #include #include "test_macros.h" // As of 1/10/2015 clang emits a -Wnonnull warnings even if the warning occurs // in an unevaluated context. For this reason we manually suppress the warning. #if defined(__clang__) #pragma clang diagnostic ignored "-Wnonnull" #endif #ifdef abs #error abs is defined #endif #ifdef labs #error labs is defined #endif #ifdef llabs #error llabs is defined #endif #ifdef div #error div is defined #endif #ifdef ldiv #error ldiv is defined #endif #ifdef lldiv #error lldiv is defined #endif #ifndef EXIT_FAILURE #error EXIT_FAILURE not defined #endif #ifndef EXIT_SUCCESS #error EXIT_SUCCESS not defined #endif #ifndef MB_CUR_MAX #error MB_CUR_MAX not defined #endif #ifndef NULL #error NULL not defined #endif #ifndef RAND_MAX #error RAND_MAX not defined #endif int main() { size_t s = 0; ((void)s); div_t d; ((void)d); ldiv_t ld; ((void)ld); lldiv_t lld; ((void)lld); char** endptr = 0; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); // Microsoft does not implement aligned_alloc in their C library #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) && !defined(_WIN32) static_assert((std::is_same::value), ""); #endif static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); wchar_t* pw = 0; const wchar_t* pwc = 0; char* pc = 0; static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); static_assert((std::is_same::value), ""); }