Hi, I filed the bug (https://llvm.org/bugs/show_bug.cgi?id=26283) some
time ago and nobody picked it up, so here is a trivial patch exposing
the missing macros, that to the best of my ability were already
present as the internal underscored versions.

Perhaps a more general bug about C11 floating point (lack of)
conformance should be filed, so that some form of unit test/macro
validation could be worked on, but this patch does scratch my current
itch.

Successfully tested on x86-64 Xubuntu 14.04 with clang 3.8 from the
ppa, patched with the attached diff.

First contribution, so feel free to suggest improvements or point to
more detailed step-by-step instructions/guidelines.

Cheers,

JT
Index: lib/Headers/float.h
===================================================================
--- lib/Headers/float.h	(revision 260194)
+++ lib/Headers/float.h	(working copy)
@@ -68,6 +68,9 @@
 #    undef FLT_TRUE_MIN
 #    undef DBL_TRUE_MIN
 #    undef LDBL_TRUE_MIN
+#    undef FLT_DECIMAL_DIG
+#    undef DBL_DECIMAL_DIG
+#    undef LDBL_DECIMAL_DIG
 #  endif
 #endif
 
@@ -119,6 +122,9 @@
 #  define FLT_TRUE_MIN __FLT_DENORM_MIN__
 #  define DBL_TRUE_MIN __DBL_DENORM_MIN__
 #  define LDBL_TRUE_MIN __LDBL_DENORM_MIN__
+#  define FLT_DECIMAL_DIG __FLT_DECIMAL_DIG__
+#  define DBL_DECIMAL_DIG __DBL_DECIMAL_DIG__
+#  define LDBL_DECIMAL_DIG __DECIMAL_DIG__
 #endif
 
 #endif /* __FLOAT_H */
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to