Fix broken MinGW build of gcc.c
[official-gcc.git] / gcc / testsuite / gcc.dg / pr59940.c
blobcec8d07edd5a8590c99a5dcee319ad47f93965e2
1 /* PR c/59940 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wconversion -Woverflow" } */
5 int f (unsigned int);
6 typedef int sitype __attribute__((mode(SI)));
8 int
9 g (void)
11 sitype si = 12;
12 unsigned int ui = -1; /* { dg-warning "21:-Wsign-conversion" } */
13 unsigned char uc;
14 ui = si; /* { dg-warning "8:conversion" } */
15 si = 0x80000000; /* { dg-warning "8:-Wsign-conversion" } */
16 si = 3.2f; /* { dg-warning "8:conversion" } */
17 uc = 256; /* { dg-warning "8:-Woverflow" } */
18 si = 0x800000000; /* { dg-warning "8:-Woverflow" } */
19 return f (si) /* { dg-warning "13:conversion" } */
20 + f (si); /* { dg-warning "15:conversion" } */
23 int
24 y (void)
26 f (); /* { dg-error "3:too few arguments to function" } */
27 g (0xa); /* { dg-error "3:too many arguments to function" } */