1 /* { dg-do compile } */
2 /* Contributed by Alexander Malmberg: PR18456 */
24 int main(int argc,char **argv)
26 [(struct {int a;} *)ip foo]; /* { dg-warning "invalid receiver type" } */
27 [func1 foo]; /* { dg-warning "invalid receiver type" } */
28 [struct1.a foo]; /* { dg-warning "invalid receiver type" } */
29 /* { dg-warning "cast to pointer from integer" "" { target *-*-* } .-1 } */
30 [union1.a foo]; /* { dg-warning "invalid receiver type" } */
31 /* { dg-warning "cast to pointer from integer" "" { target *-*-* } .-1 } */
32 [struct1 foo]; /* { dg-warning "invalid receiver type" } */
33 /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
34 [union1 foo]; /* { dg-warning "invalid receiver type" } */
35 /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
36 [struct2 foo]; /* { dg-warning "invalid receiver type" } */
37 /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
38 [union2 foo]; /* { dg-warning "invalid receiver type" } */
39 /* { dg-error "cannot convert" "" { target *-*-* } .-1 } */
40 [f foo]; /* { dg-warning "invalid receiver type" } */