[PATCH] D34695: _Float16 preprocessor macro definitions

Roger Ferrer Ibanez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 12 08:32:06 PDT 2017


rogfer01 added inline comments.


================
Comment at: lib/Headers/float.h:137
 
+#ifdef __STDC_WANT_IEC_60559_TYPES_EXT__
+#  define FLT16_MANT_DIG  __FLT16_MANT_DIG__
----------------
My understanding is that, given that we support TS18661-2 by default, this macro should be predefined by clang and then there is no need to protect these macros.

You may want to add a test for this in `test/Preprocessor/init.c`.


================
Comment at: lib/Headers/float.h:139-142
+#  define FLT16_DECIMAL_DIG __LT16_DECIMAL_DIG__
+#  define FLT16_DIG  __LT16_DIG__
+#  define FLT16_MIN_EXP  __LT16_MIN_EXP__
+#  define FLT16_MIN_10_EXP __FLT16_MIN_10_EXP__
----------------
There is a typo here, these macros should start with `__FLT16_`. Add a test for these names `test/Headers/float.c`.


https://reviews.llvm.org/D34695





More information about the cfe-commits mailing list