blob: a0683ca37462d5d4d72c7e19656ebeda19d9a0b8 [file] [log] [blame]
// { dg-do compile }
// { dg-options "-fsyntax-only -fpermissive" }
int foo (int i, void *p)
{
if (i == p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" }
return 0;
else if (i != p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" }
return 1;
}
int bar (int i, void *p)
{
if (i < p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" }
return 0;
else if (i >= p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" }
return 1;
}
int baz (int i, void *p)
{
if (i <= p) // { dg-warning "9:ISO C.. forbids comparison between pointer and integer" }
return 0;
else if (i > p) // { dg-warning "14:ISO C.. forbids comparison between pointer and integer" }
return 1;
}