[PATCH] D37302: [Headers] Define *_HAS_SUBNORM for FLT, DBL, LDBL
Pirama Arumuga Nainar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 23 16:31:14 PDT 2018
pirama updated this revision to Diff 139670.
pirama added a comment.
Remove unexpected change from another patch.
Repository:
rC Clang
https://reviews.llvm.org/D37302
Files:
lib/Headers/float.h
test/Headers/float.c
Index: test/Headers/float.c
===================================================================
--- test/Headers/float.c
+++ test/Headers/float.c
@@ -61,6 +61,21 @@
#if ((FLT_DECIMAL_DIG > DBL_DECIMAL_DIG) || (DBL_DECIMAL_DIG > LDBL_DECIMAL_DIG))
#error "Mandatory macros {FLT,DBL,LDBL}_DECIMAL_DIG are invalid."
#endif
+ #ifndef FLT_HAS_SUBNORM
+ #error "Mandatory macro FLT_HAS_SUBNORM is missing."
+ #elif FLT_HAS_SUBNORM != __FLT_HAS_DENORM__
+ #error "Mandatory macro FLT_HAS_SUBNORM is invalid."
+ #endif
+ #ifndef LDBL_HAS_SUBNORM
+ #error "Mandatory macro LDBL_HAS_SUBNORM is missing."
+ #elif LDBL_HAS_SUBNORM != __LDBL_HAS_DENORM__
+ #error "Mandatory macro LDBL_HAS_SUBNORM is invalid."
+ #endif
+ #ifndef DBL_HAS_SUBNORM
+ #error "Mandatory macro DBL_HAS_SUBNORM is missing."
+ #elif DBL_HAS_SUBNORM != __DBL_HAS_DENORM__
+ #error "Mandatory macro DBL_HAS_SUBNORM is invalid."
+ #endif
#else
#ifdef FLT_DECIMAL_DIG
#error "Macro FLT_DECIMAL_DIG should not be defined."
@@ -71,6 +86,15 @@
#ifdef LDBL_DECIMAL_DIG
#error "Macro LDBL_DECIMAL_DIG should not be defined."
#endif
+ #ifdef FLT_HAS_SUBNORM
+ #error "Macro FLT_HAS_SUBNORM should not be defined."
+ #endif
+ #ifdef DBL_HAS_SUBNORM
+ #error "Macro DBL_HAS_SUBNORM should not be defined."
+ #endif
+ #ifdef LDBL_HAS_SUBNORM
+ #error "Macro LDBL_HAS_SUBNORM should not be defined."
+ #endif
#endif
Index: lib/Headers/float.h
===================================================================
--- lib/Headers/float.h
+++ lib/Headers/float.h
@@ -85,6 +85,9 @@
# undef FLT_DECIMAL_DIG
# undef DBL_DECIMAL_DIG
# undef LDBL_DECIMAL_DIG
+# undef FLT_HAS_SUBNORM
+# undef DBL_HAS_SUBNORM
+# undef LDBL_HAS_SUBNORM
# endif
#endif
@@ -141,6 +144,9 @@
# define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
# define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
# define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
+# define FLT_HAS_SUBNORM __FLT_HAS_DENORM__
+# define DBL_HAS_SUBNORM __DBL_HAS_DENORM__
+# define LDBL_HAS_SUBNORM __LDBL_HAS_DENORM__
#endif
#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37302.139670.patch
Type: text/x-patch
Size: 2237 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180323/b7d4081a/attachment-0001.bin>
More information about the cfe-commits
mailing list