Likewise for <errno.h>, <float.h>, <inttypes.h> On Tue, Oct 6, 2015 at 3:20 PM, Richard Smith <rich...@metafoo.co.uk> wrote:
> Split <ctype.h> header out of <cctype> > > On Tue, Oct 6, 2015 at 3:07 PM, Richard Smith <rich...@metafoo.co.uk> > wrote: > >> Next: factoring the definition of std::nullptr_t out into a separate >> file, so that <cstddef> and <stddef.h> can both use it, without <stddef.h> >> including <cstddef> and without <cstddef> providing a ::nullptr_t like >> <stddef.h> does. >> >> On Tue, Oct 6, 2015 at 3:02 PM, Eric Fiselier <e...@efcs.ca> wrote: >> >>> LGTM. >>> >>> On Tue, Oct 6, 2015 at 3:58 PM, Richard Smith <rich...@metafoo.co.uk> >>> wrote: >>> > On Mon, Oct 5, 2015 at 7:10 PM, Eric Fiselier <e...@efcs.ca> wrote: >>> >> >>> >> EricWF added a comment. >>> >> >>> >> I think thing change will help us close a number out outstanding >>> bugs. I >>> >> don't have any fundamental objections to this approach. However the >>> size of >>> >> this patch scares me. I understand the changes are mostly mechanical >>> but >>> >> their size can hide things. For example has anybody noticed that your >>> >> internal changes to `<deque>` are in this patch? It would be nice to >>> break >>> >> this down into more digestible pieces that could be quickly spot >>> checked. >>> > >>> > >>> > OK. First such patch is attached. It just removes the macro-capturing >>> > wrapper functions. >>> >> >> >
diff --git include/cerrno include/cerrno index 9804e4e..bab13b8 100644 --- include/cerrno +++ include/cerrno @@ -30,364 +30,4 @@ Macros: #pragma GCC system_header #endif -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) - -#ifdef ELAST - -const int __elast1 = ELAST+1; -const int __elast2 = ELAST+2; - -#else - -const int __elast1 = 104; -const int __elast2 = 105; - -#endif - -#ifdef ENOTRECOVERABLE - -#define EOWNERDEAD __elast1 - -#ifdef ELAST -#undef ELAST -#define ELAST EOWNERDEAD -#endif - -#elif defined(EOWNERDEAD) - -#define ENOTRECOVERABLE __elast1 -#ifdef ELAST -#undef ELAST -#define ELAST ENOTRECOVERABLE -#endif - -#else // defined(EOWNERDEAD) - -#define EOWNERDEAD __elast1 -#define ENOTRECOVERABLE __elast2 -#ifdef ELAST -#undef ELAST -#define ELAST ENOTRECOVERABLE -#endif - -#endif // defined(EOWNERDEAD) - -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) - -// supply errno values likely to be missing, particularly on Windows - -#ifndef EAFNOSUPPORT -#define EAFNOSUPPORT 9901 -#endif - -#ifndef EADDRINUSE -#define EADDRINUSE 9902 -#endif - -#ifndef EADDRNOTAVAIL -#define EADDRNOTAVAIL 9903 -#endif - -#ifndef EISCONN -#define EISCONN 9904 -#endif - -#ifndef EBADMSG -#define EBADMSG 9905 -#endif - -#ifndef ECONNABORTED -#define ECONNABORTED 9906 -#endif - -#ifndef EALREADY -#define EALREADY 9907 -#endif - -#ifndef ECONNREFUSED -#define ECONNREFUSED 9908 -#endif - -#ifndef ECONNRESET -#define ECONNRESET 9909 -#endif - -#ifndef EDESTADDRREQ -#define EDESTADDRREQ 9910 -#endif - -#ifndef EHOSTUNREACH -#define EHOSTUNREACH 9911 -#endif - -#ifndef EIDRM -#define EIDRM 9912 -#endif - -#ifndef EMSGSIZE -#define EMSGSIZE 9913 -#endif - -#ifndef ENETDOWN -#define ENETDOWN 9914 -#endif - -#ifndef ENETRESET -#define ENETRESET 9915 -#endif - -#ifndef ENETUNREACH -#define ENETUNREACH 9916 -#endif - -#ifndef ENOBUFS -#define ENOBUFS 9917 -#endif - -#ifndef ENOLINK -#define ENOLINK 9918 -#endif - -#ifndef ENODATA -#define ENODATA 9919 -#endif - -#ifndef ENOMSG -#define ENOMSG 9920 -#endif - -#ifndef ENOPROTOOPT -#define ENOPROTOOPT 9921 -#endif - -#ifndef ENOSR -#define ENOSR 9922 -#endif - -#ifndef ENOTSOCK -#define ENOTSOCK 9923 -#endif - -#ifndef ENOSTR -#define ENOSTR 9924 -#endif - -#ifndef ENOTCONN -#define ENOTCONN 9925 -#endif - -#ifndef ENOTSUP -#define ENOTSUP 9926 -#endif - -#ifndef ECANCELED -#define ECANCELED 9927 -#endif - -#ifndef EINPROGRESS -#define EINPROGRESS 9928 -#endif - -#ifndef EOPNOTSUPP -#define EOPNOTSUPP 9929 -#endif - -#ifndef EWOULDBLOCK -#define EWOULDBLOCK 9930 -#endif - -#ifndef EOWNERDEAD -#define EOWNERDEAD 9931 -#endif - -#ifndef EPROTO -#define EPROTO 9932 -#endif - -#ifndef EPROTONOSUPPORT -#define EPROTONOSUPPORT 9933 -#endif - -#ifndef ENOTRECOVERABLE -#define ENOTRECOVERABLE 9934 -#endif - -#ifndef ETIME -#define ETIME 9935 -#endif - -#ifndef ETXTBSY -#define ETXTBSY 9936 -#endif - -#ifndef ETIMEDOUT -#define ETIMEDOUT 9938 -#endif - -#ifndef ELOOP -#define ELOOP 9939 -#endif - -#ifndef EOVERFLOW -#define EOVERFLOW 9940 -#endif - -#ifndef EPROTOTYPE -#define EPROTOTYPE 9941 -#endif - -#ifndef ENOSYS -#define ENOSYS 9942 -#endif - -#ifndef EINVAL -#define EINVAL 9943 -#endif - -#ifndef ERANGE -#define ERANGE 9944 -#endif - -#ifndef EILSEQ -#define EILSEQ 9945 -#endif - -// Windows Mobile doesn't appear to define these: - -#ifndef E2BIG -#define E2BIG 9946 -#endif - -#ifndef EDOM -#define EDOM 9947 -#endif - -#ifndef EFAULT -#define EFAULT 9948 -#endif - -#ifndef EBADF -#define EBADF 9949 -#endif - -#ifndef EPIPE -#define EPIPE 9950 -#endif - -#ifndef EXDEV -#define EXDEV 9951 -#endif - -#ifndef EBUSY -#define EBUSY 9952 -#endif - -#ifndef ENOTEMPTY -#define ENOTEMPTY 9953 -#endif - -#ifndef ENOEXEC -#define ENOEXEC 9954 -#endif - -#ifndef EEXIST -#define EEXIST 9955 -#endif - -#ifndef EFBIG -#define EFBIG 9956 -#endif - -#ifndef ENAMETOOLONG -#define ENAMETOOLONG 9957 -#endif - -#ifndef ENOTTY -#define ENOTTY 9958 -#endif - -#ifndef EINTR -#define EINTR 9959 -#endif - -#ifndef ESPIPE -#define ESPIPE 9960 -#endif - -#ifndef EIO -#define EIO 9961 -#endif - -#ifndef EISDIR -#define EISDIR 9962 -#endif - -#ifndef ECHILD -#define ECHILD 9963 -#endif - -#ifndef ENOLCK -#define ENOLCK 9964 -#endif - -#ifndef ENOSPC -#define ENOSPC 9965 -#endif - -#ifndef ENXIO -#define ENXIO 9966 -#endif - -#ifndef ENODEV -#define ENODEV 9967 -#endif - -#ifndef ENOENT -#define ENOENT 9968 -#endif - -#ifndef ESRCH -#define ESRCH 9969 -#endif - -#ifndef ENOTDIR -#define ENOTDIR 9970 -#endif - -#ifndef ENOMEM -#define ENOMEM 9971 -#endif - -#ifndef EPERM -#define EPERM 9972 -#endif - -#ifndef EACCES -#define EACCES 9973 -#endif - -#ifndef EROFS -#define EROFS 9974 -#endif - -#ifndef EDEADLK -#define EDEADLK 9975 -#endif - -#ifndef EAGAIN -#define EAGAIN 9976 -#endif - -#ifndef ENFILE -#define ENFILE 9977 -#endif - -#ifndef EMFILE -#define EMFILE 9978 -#endif - -#ifndef EMLINK -#define EMLINK 9979 -#endif - #endif // _LIBCPP_CERRNO diff --git include/errno.h include/errno.h new file mode 100644 index 0000000..3cda2af --- /dev/null +++ include/errno.h @@ -0,0 +1,393 @@ +// -*- C++ -*- +//===-------------------------- errno.h -----------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_ERRNO_H +#define _LIBCPP_ERRNO_H + +/* + errno.h synopsis + +Macros: + + EDOM + EILSEQ // C99 + ERANGE + errno + +*/ + +#include <__config> +#include_next <errno.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) + +#ifdef ELAST + +static const int __elast1 = ELAST+1; +static const int __elast2 = ELAST+2; + +#else + +static const int __elast1 = 104; +static const int __elast2 = 105; + +#endif + +#ifdef ENOTRECOVERABLE + +#define EOWNERDEAD __elast1 + +#ifdef ELAST +#undef ELAST +#define ELAST EOWNERDEAD +#endif + +#elif defined(EOWNERDEAD) + +#define ENOTRECOVERABLE __elast1 +#ifdef ELAST +#undef ELAST +#define ELAST ENOTRECOVERABLE +#endif + +#else // defined(EOWNERDEAD) + +#define EOWNERDEAD __elast1 +#define ENOTRECOVERABLE __elast2 +#ifdef ELAST +#undef ELAST +#define ELAST ENOTRECOVERABLE +#endif + +#endif // defined(EOWNERDEAD) + +#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) + +// supply errno values likely to be missing, particularly on Windows + +#ifndef EAFNOSUPPORT +#define EAFNOSUPPORT 9901 +#endif + +#ifndef EADDRINUSE +#define EADDRINUSE 9902 +#endif + +#ifndef EADDRNOTAVAIL +#define EADDRNOTAVAIL 9903 +#endif + +#ifndef EISCONN +#define EISCONN 9904 +#endif + +#ifndef EBADMSG +#define EBADMSG 9905 +#endif + +#ifndef ECONNABORTED +#define ECONNABORTED 9906 +#endif + +#ifndef EALREADY +#define EALREADY 9907 +#endif + +#ifndef ECONNREFUSED +#define ECONNREFUSED 9908 +#endif + +#ifndef ECONNRESET +#define ECONNRESET 9909 +#endif + +#ifndef EDESTADDRREQ +#define EDESTADDRREQ 9910 +#endif + +#ifndef EHOSTUNREACH +#define EHOSTUNREACH 9911 +#endif + +#ifndef EIDRM +#define EIDRM 9912 +#endif + +#ifndef EMSGSIZE +#define EMSGSIZE 9913 +#endif + +#ifndef ENETDOWN +#define ENETDOWN 9914 +#endif + +#ifndef ENETRESET +#define ENETRESET 9915 +#endif + +#ifndef ENETUNREACH +#define ENETUNREACH 9916 +#endif + +#ifndef ENOBUFS +#define ENOBUFS 9917 +#endif + +#ifndef ENOLINK +#define ENOLINK 9918 +#endif + +#ifndef ENODATA +#define ENODATA 9919 +#endif + +#ifndef ENOMSG +#define ENOMSG 9920 +#endif + +#ifndef ENOPROTOOPT +#define ENOPROTOOPT 9921 +#endif + +#ifndef ENOSR +#define ENOSR 9922 +#endif + +#ifndef ENOTSOCK +#define ENOTSOCK 9923 +#endif + +#ifndef ENOSTR +#define ENOSTR 9924 +#endif + +#ifndef ENOTCONN +#define ENOTCONN 9925 +#endif + +#ifndef ENOTSUP +#define ENOTSUP 9926 +#endif + +#ifndef ECANCELED +#define ECANCELED 9927 +#endif + +#ifndef EINPROGRESS +#define EINPROGRESS 9928 +#endif + +#ifndef EOPNOTSUPP +#define EOPNOTSUPP 9929 +#endif + +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 9930 +#endif + +#ifndef EOWNERDEAD +#define EOWNERDEAD 9931 +#endif + +#ifndef EPROTO +#define EPROTO 9932 +#endif + +#ifndef EPROTONOSUPPORT +#define EPROTONOSUPPORT 9933 +#endif + +#ifndef ENOTRECOVERABLE +#define ENOTRECOVERABLE 9934 +#endif + +#ifndef ETIME +#define ETIME 9935 +#endif + +#ifndef ETXTBSY +#define ETXTBSY 9936 +#endif + +#ifndef ETIMEDOUT +#define ETIMEDOUT 9938 +#endif + +#ifndef ELOOP +#define ELOOP 9939 +#endif + +#ifndef EOVERFLOW +#define EOVERFLOW 9940 +#endif + +#ifndef EPROTOTYPE +#define EPROTOTYPE 9941 +#endif + +#ifndef ENOSYS +#define ENOSYS 9942 +#endif + +#ifndef EINVAL +#define EINVAL 9943 +#endif + +#ifndef ERANGE +#define ERANGE 9944 +#endif + +#ifndef EILSEQ +#define EILSEQ 9945 +#endif + +// Windows Mobile doesn't appear to define these: + +#ifndef E2BIG +#define E2BIG 9946 +#endif + +#ifndef EDOM +#define EDOM 9947 +#endif + +#ifndef EFAULT +#define EFAULT 9948 +#endif + +#ifndef EBADF +#define EBADF 9949 +#endif + +#ifndef EPIPE +#define EPIPE 9950 +#endif + +#ifndef EXDEV +#define EXDEV 9951 +#endif + +#ifndef EBUSY +#define EBUSY 9952 +#endif + +#ifndef ENOTEMPTY +#define ENOTEMPTY 9953 +#endif + +#ifndef ENOEXEC +#define ENOEXEC 9954 +#endif + +#ifndef EEXIST +#define EEXIST 9955 +#endif + +#ifndef EFBIG +#define EFBIG 9956 +#endif + +#ifndef ENAMETOOLONG +#define ENAMETOOLONG 9957 +#endif + +#ifndef ENOTTY +#define ENOTTY 9958 +#endif + +#ifndef EINTR +#define EINTR 9959 +#endif + +#ifndef ESPIPE +#define ESPIPE 9960 +#endif + +#ifndef EIO +#define EIO 9961 +#endif + +#ifndef EISDIR +#define EISDIR 9962 +#endif + +#ifndef ECHILD +#define ECHILD 9963 +#endif + +#ifndef ENOLCK +#define ENOLCK 9964 +#endif + +#ifndef ENOSPC +#define ENOSPC 9965 +#endif + +#ifndef ENXIO +#define ENXIO 9966 +#endif + +#ifndef ENODEV +#define ENODEV 9967 +#endif + +#ifndef ENOENT +#define ENOENT 9968 +#endif + +#ifndef ESRCH +#define ESRCH 9969 +#endif + +#ifndef ENOTDIR +#define ENOTDIR 9970 +#endif + +#ifndef ENOMEM +#define ENOMEM 9971 +#endif + +#ifndef EPERM +#define EPERM 9972 +#endif + +#ifndef EACCES +#define EACCES 9973 +#endif + +#ifndef EROFS +#define EROFS 9974 +#endif + +#ifndef EDEADLK +#define EDEADLK 9975 +#endif + +#ifndef EAGAIN +#define EAGAIN 9976 +#endif + +#ifndef ENFILE +#define ENFILE 9977 +#endif + +#ifndef EMFILE +#define EMFILE 9978 +#endif + +#ifndef EMLINK +#define EMLINK 9979 +#endif + +#endif // _LIBCPP_ERRNO_H
diff --git include/cfloat include/cfloat index 5fa5655..176fa9d 100644 --- include/cfloat +++ include/cfloat @@ -67,12 +67,4 @@ Macros: #pragma GCC system_header #endif -#ifndef FLT_EVAL_METHOD -#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ -#endif - -#ifndef DECIMAL_DIG -#define DECIMAL_DIG __DECIMAL_DIG__ -#endif - #endif // _LIBCPP_CFLOAT diff --git include/float.h include/float.h new file mode 100644 index 0000000..275388e --- /dev/null +++ include/float.h @@ -0,0 +1,78 @@ +// -*- C++ -*- +//===--------------------------- float.h ----------------------------------===// +// +// 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. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_FLOAT_H +#define _LIBCPP_FLOAT_H + +/* + float.h synopsis + +Macros: + + FLT_ROUNDS + FLT_EVAL_METHOD // C99 + FLT_RADIX + + FLT_MANT_DIG + DBL_MANT_DIG + LDBL_MANT_DIG + + DECIMAL_DIG // C99 + + FLT_DIG + DBL_DIG + LDBL_DIG + + FLT_MIN_EXP + DBL_MIN_EXP + LDBL_MIN_EXP + + FLT_MIN_10_EXP + DBL_MIN_10_EXP + LDBL_MIN_10_EXP + + FLT_MAX_EXP + DBL_MAX_EXP + LDBL_MAX_EXP + + FLT_MAX_10_EXP + DBL_MAX_10_EXP + LDBL_MAX_10_EXP + + FLT_MAX + DBL_MAX + LDBL_MAX + + FLT_EPSILON + DBL_EPSILON + LDBL_EPSILON + + FLT_MIN + DBL_MIN + LDBL_MIN + +*/ + +#include <__config> +#include_next <float.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#ifndef FLT_EVAL_METHOD +#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__ +#endif + +#ifndef DECIMAL_DIG +#define DECIMAL_DIG __DECIMAL_DIG__ +#endif + +#endif // _LIBCPP_FLOAT_H
diff --git include/cinttypes include/cinttypes index cfd763c..3f61b06 100644 --- include/cinttypes +++ include/cinttypes @@ -246,10 +246,7 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int _LIBCPP_BEGIN_NAMESPACE_STD using::imaxdiv_t; - -#undef imaxabs using::imaxabs; -#undef imaxdiv using::imaxdiv; using::strtoimax; using::strtoumax; diff --git include/inttypes.h include/inttypes.h new file mode 100644 index 0000000..a20a561 --- /dev/null +++ include/inttypes.h @@ -0,0 +1,250 @@ +// -*- C++ -*- +//===--------------------------- inttypes.h -------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCPP_INTTYPES_H +#define _LIBCPP_INTTYPES_H + +/* + inttypes.h synopsis + +This entire header is C99 / C++0X + +#include <stdint.h> // <cinttypes> includes <cstdint> + +Macros: + + PRId8 + PRId16 + PRId32 + PRId64 + + PRIdLEAST8 + PRIdLEAST16 + PRIdLEAST32 + PRIdLEAST64 + + PRIdFAST8 + PRIdFAST16 + PRIdFAST32 + PRIdFAST64 + + PRIdMAX + PRIdPTR + + PRIi8 + PRIi16 + PRIi32 + PRIi64 + + PRIiLEAST8 + PRIiLEAST16 + PRIiLEAST32 + PRIiLEAST64 + + PRIiFAST8 + PRIiFAST16 + PRIiFAST32 + PRIiFAST64 + + PRIiMAX + PRIiPTR + + PRIo8 + PRIo16 + PRIo32 + PRIo64 + + PRIoLEAST8 + PRIoLEAST16 + PRIoLEAST32 + PRIoLEAST64 + + PRIoFAST8 + PRIoFAST16 + PRIoFAST32 + PRIoFAST64 + + PRIoMAX + PRIoPTR + + PRIu8 + PRIu16 + PRIu32 + PRIu64 + + PRIuLEAST8 + PRIuLEAST16 + PRIuLEAST32 + PRIuLEAST64 + + PRIuFAST8 + PRIuFAST16 + PRIuFAST32 + PRIuFAST64 + + PRIuMAX + PRIuPTR + + PRIx8 + PRIx16 + PRIx32 + PRIx64 + + PRIxLEAST8 + PRIxLEAST16 + PRIxLEAST32 + PRIxLEAST64 + + PRIxFAST8 + PRIxFAST16 + PRIxFAST32 + PRIxFAST64 + + PRIxMAX + PRIxPTR + + PRIX8 + PRIX16 + PRIX32 + PRIX64 + + PRIXLEAST8 + PRIXLEAST16 + PRIXLEAST32 + PRIXLEAST64 + + PRIXFAST8 + PRIXFAST16 + PRIXFAST32 + PRIXFAST64 + + PRIXMAX + PRIXPTR + + SCNd8 + SCNd16 + SCNd32 + SCNd64 + + SCNdLEAST8 + SCNdLEAST16 + SCNdLEAST32 + SCNdLEAST64 + + SCNdFAST8 + SCNdFAST16 + SCNdFAST32 + SCNdFAST64 + + SCNdMAX + SCNdPTR + + SCNi8 + SCNi16 + SCNi32 + SCNi64 + + SCNiLEAST8 + SCNiLEAST16 + SCNiLEAST32 + SCNiLEAST64 + + SCNiFAST8 + SCNiFAST16 + SCNiFAST32 + SCNiFAST64 + + SCNiMAX + SCNiPTR + + SCNo8 + SCNo16 + SCNo32 + SCNo64 + + SCNoLEAST8 + SCNoLEAST16 + SCNoLEAST32 + SCNoLEAST64 + + SCNoFAST8 + SCNoFAST16 + SCNoFAST32 + SCNoFAST64 + + SCNoMAX + SCNoPTR + + SCNu8 + SCNu16 + SCNu32 + SCNu64 + + SCNuLEAST8 + SCNuLEAST16 + SCNuLEAST32 + SCNuLEAST64 + + SCNuFAST8 + SCNuFAST16 + SCNuFAST32 + SCNuFAST64 + + SCNuMAX + SCNuPTR + + SCNx8 + SCNx16 + SCNx32 + SCNx64 + + SCNxLEAST8 + SCNxLEAST16 + SCNxLEAST32 + SCNxLEAST64 + + SCNxFAST8 + SCNxFAST16 + SCNxFAST32 + SCNxFAST64 + + SCNxMAX + SCNxPTR + +Types: + + imaxdiv_t + +intmax_t imaxabs(intmax_t j); +imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); +intmax_t strtoimax(const char* restrict nptr, char** restrict endptr, int base); +uintmax_t strtoumax(const char* restrict nptr, char** restrict endptr, int base); +intmax_t wcstoimax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); +uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base); + +*/ + +#include <__config> +#include_next <inttypes.h> + +#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +#pragma GCC system_header +#endif + +#ifdef __cplusplus + +#include <stdint.h> + +#undef imaxabs +#undef imaxdiv + +#endif + +#endif // _LIBCPP_INTTYPES_H diff --git test/std/depr/depr.c.headers/inttypes_h.pass.cpp test/std/depr/depr.c.headers/inttypes_h.pass.cpp index a799aea..637cf72 100644 --- test/std/depr/depr.c.headers/inttypes_h.pass.cpp +++ test/std/depr/depr.c.headers/inttypes_h.pass.cpp @@ -12,6 +12,250 @@ #include <inttypes.h> #include <type_traits> +#ifndef INT8_MIN +#error INT8_MIN not defined +#endif + +#ifndef INT16_MIN +#error INT16_MIN not defined +#endif + +#ifndef INT32_MIN +#error INT32_MIN not defined +#endif + +#ifndef INT64_MIN +#error INT64_MIN not defined +#endif + +#ifndef INT8_MAX +#error INT8_MAX not defined +#endif + +#ifndef INT16_MAX +#error INT16_MAX not defined +#endif + +#ifndef INT32_MAX +#error INT32_MAX not defined +#endif + +#ifndef INT64_MAX +#error INT64_MAX not defined +#endif + +#ifndef UINT8_MAX +#error UINT8_MAX not defined +#endif + +#ifndef UINT16_MAX +#error UINT16_MAX not defined +#endif + +#ifndef UINT32_MAX +#error UINT32_MAX not defined +#endif + +#ifndef UINT64_MAX +#error UINT64_MAX not defined +#endif + +#ifndef INT_LEAST8_MIN +#error INT_LEAST8_MIN not defined +#endif + +#ifndef INT_LEAST16_MIN +#error INT_LEAST16_MIN not defined +#endif + +#ifndef INT_LEAST32_MIN +#error INT_LEAST32_MIN not defined +#endif + +#ifndef INT_LEAST64_MIN +#error INT_LEAST64_MIN not defined +#endif + +#ifndef INT_LEAST8_MAX +#error INT_LEAST8_MAX not defined +#endif + +#ifndef INT_LEAST16_MAX +#error INT_LEAST16_MAX not defined +#endif + +#ifndef INT_LEAST32_MAX +#error INT_LEAST32_MAX not defined +#endif + +#ifndef INT_LEAST64_MAX +#error INT_LEAST64_MAX not defined +#endif + +#ifndef UINT_LEAST8_MAX +#error UINT_LEAST8_MAX not defined +#endif + +#ifndef UINT_LEAST16_MAX +#error UINT_LEAST16_MAX not defined +#endif + +#ifndef UINT_LEAST32_MAX +#error UINT_LEAST32_MAX not defined +#endif + +#ifndef UINT_LEAST64_MAX +#error UINT_LEAST64_MAX not defined +#endif + +#ifndef INT_FAST8_MIN +#error INT_FAST8_MIN not defined +#endif + +#ifndef INT_FAST16_MIN +#error INT_FAST16_MIN not defined +#endif + +#ifndef INT_FAST32_MIN +#error INT_FAST32_MIN not defined +#endif + +#ifndef INT_FAST64_MIN +#error INT_FAST64_MIN not defined +#endif + +#ifndef INT_FAST8_MAX +#error INT_FAST8_MAX not defined +#endif + +#ifndef INT_FAST16_MAX +#error INT_FAST16_MAX not defined +#endif + +#ifndef INT_FAST32_MAX +#error INT_FAST32_MAX not defined +#endif + +#ifndef INT_FAST64_MAX +#error INT_FAST64_MAX not defined +#endif + +#ifndef UINT_FAST8_MAX +#error UINT_FAST8_MAX not defined +#endif + +#ifndef UINT_FAST16_MAX +#error UINT_FAST16_MAX not defined +#endif + +#ifndef UINT_FAST32_MAX +#error UINT_FAST32_MAX not defined +#endif + +#ifndef UINT_FAST64_MAX +#error UINT_FAST64_MAX not defined +#endif + +#ifndef INTPTR_MIN +#error INTPTR_MIN not defined +#endif + +#ifndef INTPTR_MAX +#error INTPTR_MAX not defined +#endif + +#ifndef UINTPTR_MAX +#error UINTPTR_MAX not defined +#endif + +#ifndef INTMAX_MIN +#error INTMAX_MIN not defined +#endif + +#ifndef INTMAX_MAX +#error INTMAX_MAX not defined +#endif + +#ifndef UINTMAX_MAX +#error UINTMAX_MAX not defined +#endif + +#ifndef PTRDIFF_MIN +#error PTRDIFF_MIN not defined +#endif + +#ifndef PTRDIFF_MAX +#error PTRDIFF_MAX not defined +#endif + +#ifndef SIG_ATOMIC_MIN +#error SIG_ATOMIC_MIN not defined +#endif + +#ifndef SIG_ATOMIC_MAX +#error SIG_ATOMIC_MAX not defined +#endif + +#ifndef SIZE_MAX +#error SIZE_MAX not defined +#endif + +#ifndef WCHAR_MIN +#error WCHAR_MIN not defined +#endif + +#ifndef WCHAR_MAX +#error WCHAR_MAX not defined +#endif + +#ifndef WINT_MIN +#error WINT_MIN not defined +#endif + +#ifndef WINT_MAX +#error WINT_MAX not defined +#endif + +#ifndef INT8_C +#error INT8_C not defined +#endif + +#ifndef INT16_C +#error INT16_C not defined +#endif + +#ifndef INT32_C +#error INT32_C not defined +#endif + +#ifndef INT64_C +#error INT64_C not defined +#endif + +#ifndef UINT8_C +#error UINT8_C not defined +#endif + +#ifndef UINT16_C +#error UINT16_C not defined +#endif + +#ifndef UINT32_C +#error UINT32_C not defined +#endif + +#ifndef UINT64_C +#error UINT64_C not defined +#endif + +#ifndef INTMAX_C +#error INTMAX_C not defined +#endif + +#ifndef UINTMAX_C +#error UINTMAX_C not defined +#endif + #ifndef PRId8 #error PRId8 not defined #endif @@ -631,8 +875,49 @@ int main() { { - imaxdiv_t i1 = {0}; - ((void)i1); + int8_t i1 = 0; + int16_t i2 = 0; + int32_t i3 = 0; + int64_t i4 = 0; + } + { + uint8_t i1 = 0; + uint16_t i2 = 0; + uint32_t i3 = 0; + uint64_t i4 = 0; + } + { + int_least8_t i1 = 0; + int_least16_t i2 = 0; + int_least32_t i3 = 0; + int_least64_t i4 = 0; + } + { + uint_least8_t i1 = 0; + uint_least16_t i2 = 0; + uint_least32_t i3 = 0; + uint_least64_t i4 = 0; + } + { + int_fast8_t i1 = 0; + int_fast16_t i2 = 0; + int_fast32_t i3 = 0; + int_fast64_t i4 = 0; + } + { + uint_fast8_t i1 = 0; + uint_fast16_t i2 = 0; + uint_fast32_t i3 = 0; + uint_fast64_t i4 = 0; + } + { + intptr_t i1 = 0; + uintptr_t i2 = 0; + intmax_t i3 = 0; + uintmax_t i4 = 0; + } + { + imaxdiv_t i1 = {0}; } intmax_t i = 0; static_assert((std::is_same<decltype(imaxabs(i)), intmax_t>::value), "");
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits