diff options
Diffstat (limited to 'test/builtins/Unit/floatuntixf_test.c')
-rw-r--r-- | test/builtins/Unit/floatuntixf_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/builtins/Unit/floatuntixf_test.c b/test/builtins/Unit/floatuntixf_test.c index 0f7ad463450d..a9a8441d0c32 100644 --- a/test/builtins/Unit/floatuntixf_test.c +++ b/test/builtins/Unit/floatuntixf_test.c @@ -18,7 +18,7 @@ #include <float.h> #include <stdio.h> -#ifdef CRT_HAS_128BIT +#if defined(CRT_HAS_128BIT) && HAS_80_BIT_LONG_DOUBLE // Returns: convert a to a long double, rounding toward even. @@ -43,15 +43,15 @@ int test__floatuntixf(tu_int a, long double expected) return x != expected; } -char assumption_1[sizeof(tu_int) == 2*sizeof(du_int)] = {0}; -char assumption_2[sizeof(tu_int)*CHAR_BIT == 128] = {0}; -char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0}; +COMPILE_TIME_ASSERT(sizeof(tu_int) == 2*sizeof(du_int)); +COMPILE_TIME_ASSERT(sizeof(tu_int)*CHAR_BIT == 128); +COMPILE_TIME_ASSERT(sizeof(long double)*CHAR_BIT == 128); #endif int main() { -#ifdef CRT_HAS_128BIT +#if defined(CRT_HAS_128BIT) && HAS_80_BIT_LONG_DOUBLE if (test__floatuntixf(0, 0.0)) return 1; |