diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/dfp/c2x-constants-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/dfp/c2x-constants-1.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/dfp/c2x-constants-1.c b/gcc/testsuite/gcc.dg/dfp/c2x-constants-1.c new file mode 100644 index 00000000000..337550602fc --- /dev/null +++ b/gcc/testsuite/gcc.dg/dfp/c2x-constants-1.c @@ -0,0 +1,13 @@ +/* Test that DFP constants are accepted in C2X mode. */ +/* { dg-do compile } */ +/* { dg-options "-std=c2x -pedantic-errors" } */ + +int a = (int) 1.1DF; +int b = (int) 2.df; +int c = (int) .33DD; +int d = (int) 2e1dd; +int e = (int) .3e2DL; +int f = (int) 4.5e3dl; +int g = (int) 5.e0DF; +int h = (int) 1e+2df; +int i = (int) 1000e-3DL; |