| 1 |
// { dg-do assemble } |
| 2 |
// Copyright (C) 1999 Free Software Foundation, Inc. |
| 3 |
// Contributed by Nathan Sidwell 1 Sep 1999 <[email protected]> |
| 4 |
|
| 5 |
// [expr.unary.op]/1 says you can dereference all pointers except for pointers |
| 6 |
// to cv void. |
| 7 |
|
| 8 |
void fn (void *vp, volatile void *vvp) |
| 9 |
{ |
| 10 |
*vp; // { dg-error "3:.void\\*. is not a pointer-to-object type" } not a pointer to object |
| 11 |
*vvp; // { dg-error "3:.volatile void\\*. is not a pointer-to-object type" } not a pointer to object |
| 12 |
&*vp; // { dg-error "4:.void\\*. is not a pointer-to-object type" } not a pointer to object |
| 13 |
&*vvp; // { dg-error "4:.volatile void\\*. is not a pointer-to-object type" } not a pointer to object |
| 14 |
} |