Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/c2x-float-1.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* Test *_NORM_MAX macros. */ | |
2 /* { dg-do run } */ | |
3 /* { dg-options "-std=c2x -pedantic-errors" } */ | |
4 | |
5 #include <float.h> | |
6 | |
7 #ifndef FLT_NORM_MAX | |
8 #error "FLT_NORM_MAX undefined" | |
9 #endif | |
10 | |
11 #ifndef DBL_NORM_MAX | |
12 #error "DBL_NORM_MAX undefined" | |
13 #endif | |
14 | |
15 #ifndef LDBL_NORM_MAX | |
16 #error "LDBL_NORM_MAX undefined" | |
17 #endif | |
18 | |
19 extern void abort (void); | |
20 extern void exit (int); | |
21 | |
22 int | |
23 main (void) | |
24 { | |
25 if (FLT_NORM_MAX != FLT_MAX) | |
26 abort (); | |
27 if (DBL_NORM_MAX != DBL_MAX) | |
28 abort (); | |
29 #if LDBL_MANT_DIG == 106 | |
30 if (LDBL_NORM_MAX != 0x0.ffffffffffffffffffffffffffcp1023L) | |
31 abort (); | |
32 #else | |
33 if (LDBL_NORM_MAX != LDBL_MAX) | |
34 abort (); | |
35 #endif | |
36 exit (0); | |
37 } |