diff options
Diffstat (limited to 'gcc/testsuite/objc.dg')
-rw-r--r-- | gcc/testsuite/objc.dg/attributes/root-class-01.m | 11 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/root-class-00.m | 10 |
2 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/attributes/root-class-01.m b/gcc/testsuite/objc.dg/attributes/root-class-01.m new file mode 100644 index 0000000..84da94a --- /dev/null +++ b/gcc/testsuite/objc.dg/attributes/root-class-01.m @@ -0,0 +1,11 @@ +/* Test Wobjc-root-class warning is suppressed by the objc_root_class attr. + Note that we don't issue a warning unless the TU contains an implementation + for the class. This should compile without warning. */ +/* { dg-additional-options "-fsyntax-only " } */ + +__attribute__((objc_root_class)) +@interface ARootObject +@end + +@implementation ARootObject +@end diff --git a/gcc/testsuite/objc.dg/root-class-00.m b/gcc/testsuite/objc.dg/root-class-00.m new file mode 100644 index 0000000..1f73f73 --- /dev/null +++ b/gcc/testsuite/objc.dg/root-class-00.m @@ -0,0 +1,10 @@ +/* Test Wobjc-root-class. + Note that we don't issue a warning unless the TU contains an implementation + for the class. */ +/* { dg-additional-options "-fsyntax-only " } */ + +@interface ARootObject +@end + +@implementation ARootObject +@end /* { dg-warning {class 'ARootObject' defined without specifying a base class} } */ |