[PATCH] D137267: [clang][Headers] Only define FLT_EVAL_METHOD for C99 and later

Adhemerval Zanella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 8 08:59:11 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG92e172309cf6: [clang][Headers] Only define FLT_EVAL_METHOD for C99 and later (authored by zatrazz).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137267/new/

https://reviews.llvm.org/D137267

Files:
  clang/lib/Headers/float.h


Index: clang/lib/Headers/float.h
===================================================================
--- clang/lib/Headers/float.h
+++ clang/lib/Headers/float.h
@@ -86,7 +86,10 @@
 
 /* Characteristics of floating point types, C99 5.2.4.2.2 */
 
+#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) ||              \
+    (defined(__cplusplus) && __cplusplus >= 201103L)
 #define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
+#endif
 #define FLT_ROUNDS (__builtin_flt_rounds())
 #define FLT_RADIX __FLT_RADIX__
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137267.474023.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221108/37214468/attachment-0001.bin>


More information about the cfe-commits mailing list