zatrazz created this revision.
zatrazz added reviewers: jfb, eli.friedman, MaskRay.
Herald added a subscriber: StephenFan.
Herald added a project: All.
zatrazz requested review of this revision.
Herald added a project: clang.

It was reported by glibc conform test [1].

[1] 
https://sourceware.org/git/?p=glibc.git;a=blob;f=conform/data/float.h-data;h=7b98fc03447b8918da4a0cf47d41fb3e17f4f791;hb=HEAD


Repository:
  rG LLVM Github Monorepo

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__
 


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__
 
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D137267: [clang... Adhemerval Zanella via Phabricator via cfe-commits

Reply via email to