[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
Wed Nov 2 10:03:59 PDT 2022
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__
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137267.472665.patch
Type: text/x-patch
Size: 515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221102/8210ab07/attachment.bin>
More information about the cfe-commits
mailing list