c++: trait as typename scope [PR116052]
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / c23-float-dfp-4.c
blobfbd52ce3e7bf315db1e09831f33e97959a42e903
1 /* Test DEC_INFINITY defined in <float.h> with DFP support. */
2 /* { dg-options "-std=c23" } */
4 #include <float.h>
6 #ifndef DEC_INFINITY
7 # error "DEC_INFINITY not defined"
8 #endif
10 volatile _Decimal32 d = DEC_INFINITY;
12 extern void abort (void);
13 extern void exit (int);
15 int
16 main (void)
18 (void) _Generic (DEC_INFINITY, _Decimal32 : 0);
19 if (!(DEC_INFINITY > DEC32_MAX))
20 abort ();
21 if (!(d > DEC32_MAX))
22 abort ();
23 exit (0);