1 /* Test diagnostics for arithmetic on void and function pointers.
2 Test with no special options. */
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
4 /* { dg-do compile } */
5 /* { dg-options "" } */
33 p
[0]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
34 0[p
]; /* { dg-warning "dereferencing 'void \\*' pointer" } */
35 f
[0]; /* { dg-error "subscripted value is pointer to function" } */
36 0[f
]; /* { dg-error "subscripted value is pointer to function" } */