Fix unused warnings.
[official-gcc/graphite-test-results.git] / gcc / testsuite / objc / execute / object_is_meta_class.m
blobd5aedca0899a2b7ccce2a9e42255f0eaab05787e
1 /* Contributed by Nicola Pero - Tue Jul  3 10:55:21 BST 2001 */
2 #import "../../objc-obj-c++-shared/Object1.h"
3 #import "../../objc-obj-c++-shared/next-mapping.h"
4 #include <objc/objc-api.h>
6 /* This test demonstrate a failure in object_is_meta_class which was fixed */
8 @interface EvilClass : Object
10   Class super_class;
11   const char* name;
12   long version;
13   unsigned long info;    
15 @end
17 @implementation EvilClass
18 - (id) init
20   self = [super init];
21   /* The following one is used in the runtime to mark meta classes */
22   info = 0x2L;
23   return self;
25 @end
27 int main (void)
29   /* Create an object of our EvilClass */
30   EvilClass *evilObject = [EvilClass new];
31   
32   /* Now check that the object is not a meta class object */
33   if (object_is_meta_class (evilObject))
34     {
35       printf ("object_is_meta_class failed\n");
36       abort ();
37     }
39   return 0;