Skip to content

Commit 80c6af2

Browse files
committed
Resolve floating-point comparison warning with Clang
1 parent 8255d98 commit 80c6af2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/unit-math/test-math.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,18 @@ int
9393
main (void)
9494
{
9595
#define INF INFINITY
96+
97+
#if defined(__clang__)
98+
#pragma clang diagnostic push
99+
/* Suppress Clang's -Wliteral-range warning */
100+
#pragma clang diagnostic ignored "-Wliteral-range"
101+
#endif /* defined(__clang__) */
102+
96103
#include "test-math.inc.h"
97104

105+
#if defined(__clang__)
106+
#pragma clang diagnostic pop
107+
#endif /* defined(__clang__) */
108+
98109
return passed ? 0 : 1;
99110
} /* main */

0 commit comments

Comments
 (0)