Skip to content

Commit 6cd37eb

Browse files
authored
[libc] Fix INFINITY being defined as a double (#103445)
Summary: If the implementation supports floating-point infinities, the macro INFINITY expands to constant expression of type float which evaluates to positive or unsigned infinity. Currently this is a double, this makes it a float.
1 parent 3bda18e commit 6cd37eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/include/llvm-libc-macros/math-macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
#define HUGE_VAL __builtin_huge_val()
3030
#define HUGE_VALF __builtin_huge_valf()
31-
#define INFINITY __builtin_inf()
31+
#define INFINITY __builtin_inff()
3232
#define NAN __builtin_nanf("")
3333

3434
#define FP_ILOGB0 (-INT_MAX - 1)

0 commit comments

Comments
 (0)