gcc/testsuite/gcc.dg/dfp/c23-constants-1.c
raw| 1 | /* Test that DFP constants are accepted in C23 mode. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c23 -pedantic-errors" } */ |
| 4 | |
| 5 | int a = (int) 1.1DF; |
| 6 | int b = (int) 2.df; |
| 7 | int c = (int) .33DD; |
| 8 | int d = (int) 2e1dd; |
| 9 | int e = (int) .3e2DL; |
| 10 | int f = (int) 4.5e3dl; |
| 11 | int g = (int) 5.e0DF; |
| 12 | int h = (int) 1e+2df; |
| 13 | int i = (int) 1000e-3DL; |