1 /* Test messages for -Wconversion (based on gcc.dg/Wconversion-2.c). */
2 /* { dg-do compile } */
3 /* { dg-options "-std=gnu99 -Wconversion" } */
8 void fd128(_Decimal128
);
11 void (*fsi
)(signed int);
12 void (*fd32
)(_Decimal32
);
13 void (*fd64
)(_Decimal64
);
14 void (*fd128
)(_Decimal128
);
26 fsi(d32
); /* { dg-warning "warning: passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
27 x
.fsi(d32
); /* { dg-warning "warning: passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
28 fsi(d64
); /* { dg-warning "warning: passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
29 x
.fsi(d64
); /* { dg-warning "warning: passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
30 fsi(d128
); /* { dg-warning "warning: passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
31 x
.fsi(d128
); /* { dg-warning "warning: passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
32 fd32(si
); /* { dg-warning "warning: passing argument 1 of 'fd32' as floating rather than integer due to prototype" } */
33 x
.fd32(si
); /* { dg-warning "warning: passing argument 1 of 'x.fd32' as floating rather than integer due to prototype" } */
34 fd64(ui
); /* { dg-warning "warning: passing argument 1 of 'fd64' as floating rather than integer due to prototype" } */
35 x
.fd64(ui
); /* { dg-warning "warning: passing argument 1 of 'x.fd64' as floating rather than integer due to prototype" } */
36 fd128(si
); /* { dg-warning "warning: passing argument 1 of 'fd128' as floating rather than integer due to prototype" } */
37 x
.fd128(ui
); /* { dg-warning "warning: passing argument 1 of 'x.fd128' as floating rather than integer due to prototype" } */
38 fd32(1.0); /* { dg-warning "warning: passing argument 1 of 'fd32' as '_Decimal32' rather than 'double' due to prototype" } */
39 x
.fd32(1.0); /* { dg-warning "warning: passing argument 1 of 'x.fd32' as '_Decimal32' rather than 'double' due to prototype" } */
40 fd64(1.0); /* { dg-warning "warning: passing argument 1 of 'fd64' as '_Decimal64' rather than 'double' due to prototype" } */
41 x
.fd64(1.0); /* { dg-warning "warning: passing argument 1 of 'x.fd64' as '_Decimal64' rather than 'double' due to prototype" } */
42 fd128(1.0); /* { dg-warning "warning: passing argument 1 of 'fd128' as '_Decimal128' rather than 'double' due to prototype" } */
43 x
.fd128(1.0); /* { dg-warning "warning: passing argument 1 of 'x.fd128' as '_Decimal128' rather than 'double' due to prototype" } */