Skip to content

Commit 92e1723

Browse files
committed
[clang][Headers] Only define FLT_EVAL_METHOD for C99 and later
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 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D137267
1 parent 913b561 commit 92e1723

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

clang/lib/Headers/float.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,10 @@
8686

8787
/* Characteristics of floating point types, C99 5.2.4.2.2 */
8888

89+
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
90+
(defined(__cplusplus) && __cplusplus >= 201103L)
8991
#define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
92+
#endif
9093
#define FLT_ROUNDS (__builtin_flt_rounds())
9194
#define FLT_RADIX __FLT_RADIX__
9295

0 commit comments

Comments
 (0)