summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_format_tests.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format_tests.c b/src/gallium/auxiliary/util/u_format_tests.c
index 457fda6c899..d34860886e1 100644
--- a/src/gallium/auxiliary/util/u_format_tests.c
+++ b/src/gallium/auxiliary/util/u_format_tests.c
@@ -66,8 +66,13 @@
{{ 0, 0, 0, 0}, { 0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
+#ifdef __GNUC__
+#define NAN __builtin_nan("")
+#define INF __builtin_inf()
+#else
#define NAN (0.0 / 0.0)
#define INF (1.0 / 0.0)
+#endif
/**
* Test cases.