aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr105635-2.c
blob: 019dbc7e557ff84a4a8d81d17ec188753b577f1c (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR c/105635 */
/* { dg-do compile } */
/* { dg-options "-Wall" } */

void foo (int, int[*]);	/* { dg-message "previous declaration of 'foo' with type" } */

foo (int x, int y)	/* { dg-error "return type defaults to 'int'" } */
{			/* { dg-warning "conflicting types for 'foo'" "" { target *-*-* } .-1 } */
			/* { dg-message "declared here" "" { target *-*-* } .-2 } */
  return (x >= 0) != (y < 0);	/* { dg-error "'return' with a value, in function returning void" } */
}