| 1 |
// PR c++/51413 |
| 2 |
// PR c++/85277 |
| 3 |
// { dg-options "-Wno-pointer-arith" } |
| 4 |
|
| 5 |
struct A |
| 6 |
{ |
| 7 |
static void foo(); |
| 8 |
}; |
| 9 |
|
| 10 |
int i = __builtin_offsetof(A, foo[1]); // { dg-error "offsetof" } |
| 11 |
int j = __builtin_offsetof(volatile A, foo[0]); // { dg-error "offsetof" } |