| 1 |
// PR c++/56815 |
| 2 |
// { dg-options "-Wpointer-arith" } |
| 3 |
|
| 4 |
int main() |
| 5 |
{ |
| 6 |
void *pv = 0; |
| 7 |
pv++; // { dg-warning "3:ISO C\\+\\+ forbids incrementing a pointer" } |
| 8 |
|
| 9 |
typedef void (*pft) (); |
| 10 |
|
| 11 |
pft pf = 0; |
| 12 |
pf++; // { dg-warning "3:ISO C\\+\\+ forbids incrementing a pointer" } |
| 13 |
} |