[clang] [C23] Add *_NORM_MAX macros to <float.h> (PR #96643)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 26 04:12:42 PDT 2024
================
@@ -207,6 +211,23 @@
#error "Mandatory macros {FLT,DBL,LDBL}_MAX_10_EXP are invalid."
#endif
+#if __STDC_VERSION__ >= 202311L || !defined(__STRICT_ANSI__)
+#ifndef FLT_NORM_MAX
+ #error "Mandatory macro FLT_NORM_MAX is missing."
+#else
+ _Static_assert(FLT_NORM_MAX >= 1.0E+37F, "Mandatory macro FLT_NORM_MAX is invalid.");
+#endif
+#ifndef DBL_NORM_MAX
+ #error "Mandatory macro DBL_NORM_MAX is missing."
+#else
+ _Static_assert(DBL_NORM_MAX >= 1.0E+37F, "Mandatory macro DBL_NORM_MAX is invalid.");
+#endif
+#ifndef LDBL_NORM_MAX
+ #error "Mandatory macro LDBL_NORM_MAX is missing."
+#else
+ _Static_assert(LDBL_NORM_MAX >= 1.0E+37F, "Mandatory macro LDBL_NORM_MAX is invalid.");
+#endif
+#endif
----------------
AaronBallman wrote:
Oops, no, that's copy pasta from me, good catch! I'll correct that.
https://github.com/llvm/llvm-project/pull/96643
More information about the cfe-commits
mailing list