aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/dfp/c23-constants-2.c
blob: d98aba4d2c09d3cb40b3a3e28b9c0cfda2ae04f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* Test that DFP constants are accepted in C23 mode: compat warnings.  */
/* { dg-do compile } */
/* { dg-options "-std=c23 -Wc11-c23-compat" } */

int a = (int) 1.1DF; /* { dg-warning "C23 feature" } */
int b = (int) 2.df; /* { dg-warning "C23 feature" } */
int c = (int) .33DD; /* { dg-warning "C23 feature" } */
int d = (int) 2e1dd; /* { dg-warning "C23 feature" } */
int e = (int) .3e2DL; /* { dg-warning "C23 feature" } */
int f = (int) 4.5e3dl; /* { dg-warning "C23 feature" } */
int g = (int) 5.e0DF; /* { dg-warning "C23 feature" } */
int h = (int) 1e+2df; /* { dg-warning "C23 feature" } */
int i = (int) 1000e-3DL; /* { dg-warning "C23 feature" } */