]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/pr61162-2.c
replace ISL with isl
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr61162-2.c
CommitLineData
6e07c515
MP
1/* PR c/61162 */
2/* { dg-do compile } */
3/* { dg-options "-Wc++-compat -Wpointer-sign -Wpedantic" } */
4
5enum e { A };
6struct s { int a; };
7
8enum e
9fn1 (void)
10{
11 return 0; /* { dg-warning "10:enum conversion in return" } */
12}
13
14int
15fn2 (struct s s)
16{
17 return s; /* { dg-error "10:incompatible types when returning" } */
18}
19
20void
21fn3 (void)
22{
23 return 3; /* { dg-warning "10:in function returning void" } */
24}
25
26int
27fn4 (int *a)
28{
29 return a; /* { dg-warning "10:return makes integer from pointer without a cast" } */
30}
31
32int *
33fn5 (int a)
34{
35 return a; /* { dg-warning "10:return makes pointer from integer without a cast" } */
36}
37
38unsigned int *
39fn6 (int *i)
40{
41 return i; /* { dg-warning "10:pointer targets in return differ" } */
42}
43
44void *
45fn7 (void (*fp) (void))
46{
47 return fp; /* { dg-warning "10:ISO C forbids return between function pointer" } */
48}