| 1 |
// { dg-do compile } |
| 2 |
// Unary plus (but not unary minus) can be applied to pointer types |
| 3 |
|
| 4 |
void *p; |
| 5 |
|
| 6 |
void f(void) |
| 7 |
{ |
| 8 |
-p; // { dg-error "wrong type argument" } |
| 9 |
+p; |
| 10 |
} |
| 11 |
|
| 12 |
template <int> |
| 13 |
void g(void) |
| 14 |
{ |
| 15 |
-p; // { dg-error "wrong type argument" } |
| 16 |
+p; |
| 17 |
} |