| 1 |
/* { dg-do compile } */ |
| 2 |
#include <objc/objc.h> |
| 3 |
|
| 4 |
#if defined(__has_attribute) && __has_attribute(objc_root_class) |
| 5 |
__attribute__((objc_root_class)) |
| 6 |
#endif |
| 7 |
@interface MyRootClass |
| 8 |
{ |
| 9 |
Class isa; |
| 10 |
} |
| 11 |
@end |
| 12 |
|
| 13 |
@interface MySubClass |
| 14 |
{ |
| 15 |
volatile int a; /* This is allowed */ |
| 16 |
extern int b; /* { dg-error "expected" } */ |
| 17 |
static int c; /* { dg-error "expected" } */ |
| 18 |
inline int d; /* { dg-error "expected" } */ |
| 19 |
typedef int e; /* { dg-error "expected" } */ |
| 20 |
__thread int f; /* { dg-error "expected" } */ |
| 21 |
} |
| 22 |
@end |