c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / dfp / c11-constants-4.c
blob09e2ae1bdd319d43fad1f258d60a889eb498fa58
1 /* Test that DFP constants are diagnosed in C11 mode: -pedantic-errors. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic-errors" } */
5 int a = (int) 1.1D32; /* { dg-error "C23 feature" } */
6 int b = (int) 2.d32; /* { dg-error "C23 feature" } */
7 int c = (int) .33D64; /* { dg-error "C23 feature" } */
8 int d = (int) 2e1d64; /* { dg-error "C23 feature" } */
9 int e = (int) .3e2D128; /* { dg-error "C23 feature" } */
10 int f = (int) 4.5e3d128; /* { dg-error "C23 feature" } */
11 int g = (int) 5.e0D32; /* { dg-error "C23 feature" } */
12 int h = (int) 1e+2d32; /* { dg-error "C23 feature" } */
13 int i = (int) 1000e-3D128; /* { dg-error "C23 feature" } */