Debian Codegraph @

gcc/testsuite/objc.dg/incomplete-type-1.m

raw
1 /* Contributed by Nicola Pero <[email protected]>, December 2010. */
2 /* { dg-do compile } */
3
4 #include <objc/objc.h>
5
6 enum type1;
7 struct type2;
8
9 #if defined(__has_attribute) && __has_attribute(objc_root_class)
10 __attribute__((objc_root_class))
11 #endif
12 @interface MyObject
13 - (void) method1: (enum type1)argument;
14 - (void) method2: (struct type2)argument;
15 @end
16
17 @implementation MyObject
18 - (void) method1: (enum type1)argument { /* { dg-error "does not have a known size" } */
19 return;
20 }
21 - (void) method2: (struct type2)argument { /* { dg-error "does not have a known size" } */
22 return;
23 }
24 @end
25