aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2012-02-07 01:02:19 +0000
committerEli Friedman <eli.friedman@gmail.com>2012-02-07 01:02:19 +0000
commit88ce85fa4f397e02084b07f221df5944bbf6d456 (patch)
treebbf6dc322d56e7d98fa581c5addeedf8ad2671ee
parent57300760964904cc022a175643342f29f46b7e6b (diff)
Add C11 FLT_TRUE_MIN and friends. <rdar://problem/10812837>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149949 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Headers/float.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Headers/float.h b/lib/Headers/float.h
index b7cb73ae59..65b517d556 100644
--- a/lib/Headers/float.h
+++ b/lib/Headers/float.h
@@ -64,6 +64,11 @@
# undef FLT_MIN
# undef DBL_MIN
# undef LDBL_MIN
+# if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
+# undef FLT_TRUE_MIN
+# undef DBL_TRUE_MIN
+# undef LDBL_TRUE_MIN
+# endif
#endif
/* Characteristics of floating point types, C99 5.2.4.2.2 */
@@ -110,4 +115,10 @@
#define DBL_MIN __DBL_MIN__
#define LDBL_MIN __LDBL_MIN__
+#if __STDC_VERSION__ >= 201112L || !defined(__STRICT_ANSI__)
+# define FLT_TRUE_MIN __FLT_DENORM_MIN__
+# define DBL_TRUE_MIN __DBL_DENORM_MIN__
+# define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
+#endif
+
#endif /* __FLOAT_H */