diff options
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/proto-lossage-2.mm')
-rw-r--r-- | gcc/testsuite/obj-c++.dg/proto-lossage-2.mm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm new file mode 100644 index 00000000000..12ec9c7b6f9 --- /dev/null +++ b/gcc/testsuite/obj-c++.dg/proto-lossage-2.mm @@ -0,0 +1,21 @@ +/* APPLE LOCAL file mainline */ +/* Don't forget to look in protocols if a class (and its superclasses) do not + provide a suitable method. */ +/* { dg-do compile } */ + +#include <objc/Object.h> + +@protocol Zot +-(void) zot; +@end + +@interface Foo : Object <Zot> +@end + +int foo() +{ + Foo *f=nil; + [f zot]; /* There should be no warnings here! */ + return 0; +} + |