1 /* Test messages for -Wtraditional-conversion
2 (based on gcc.dg/Wtraditional-conversion-2.c). */
4 /* { dg-do compile } */
5 /* { dg-options "-Wtraditional-conversion" } */
10 void fd128(_Decimal128
);
13 void (*fsi
)(signed int);
14 void (*fd32
)(_Decimal32
);
15 void (*fd64
)(_Decimal64
);
16 void (*fd128
)(_Decimal128
);
28 fsi(d32
); /* { dg-warning "passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
29 x
.fsi(d32
); /* { dg-warning "passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
30 fsi(d64
); /* { dg-warning "passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
31 x
.fsi(d64
); /* { dg-warning "passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
32 fsi(d128
); /* { dg-warning "passing argument 1 of 'fsi' as integer rather than floating due to prototype" } */
33 x
.fsi(d128
); /* { dg-warning "passing argument 1 of 'x.fsi' as integer rather than floating due to prototype" } */
34 fd32(si
); /* { dg-warning "passing argument 1 of 'fd32' as floating rather than integer due to prototype" } */
35 x
.fd32(si
); /* { dg-warning "passing argument 1 of 'x.fd32' as floating rather than integer due to prototype" } */
36 fd64(ui
); /* { dg-warning "passing argument 1 of 'fd64' as floating rather than integer due to prototype" } */
37 x
.fd64(ui
); /* { dg-warning "passing argument 1 of 'x.fd64' as floating rather than integer due to prototype" } */
38 fd128(si
); /* { dg-warning "passing argument 1 of 'fd128' as floating rather than integer due to prototype" } */
39 x
.fd128(ui
); /* { dg-warning "passing argument 1 of 'x.fd128' as floating rather than integer due to prototype" } */
40 fd32(1.0); /* { dg-warning "passing argument 1 of 'fd32' as '_Decimal32' rather than 'double' due to prototype" } */
41 x
.fd32(1.0); /* { dg-warning "passing argument 1 of 'x.fd32' as '_Decimal32' rather than 'double' due to prototype" } */
42 fd64(1.0); /* { dg-warning "passing argument 1 of 'fd64' as '_Decimal64' rather than 'double' due to prototype" } */
43 x
.fd64(1.0); /* { dg-warning "passing argument 1 of 'x.fd64' as '_Decimal64' rather than 'double' due to prototype" } */
44 fd128(1.0); /* { dg-warning "passing argument 1 of 'fd128' as '_Decimal128' rather than 'double' due to prototype" } */
45 x
.fd128(1.0); /* { dg-warning "passing argument 1 of 'x.fd128' as '_Decimal128' rather than 'double' due to prototype" } */