1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, November 2010. */
2 /* { dg-do compile } */
3 /* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
5 /* Test deprecate attribute with a forward declarations of
10 #include <objc/runtime.h>
12 __attribute__ ((deprecated))
13 @protocol DeprecatedProtocol1;
15 @protocol NonDeprecatedProtocol1;
17 void function1 (id <DeprecatedProtocol1> object); /* { dg-warning "is deprecated" } */
18 void function2 (id <NonDeprecatedProtocol1> object);
22 void function3 (Class4 <DeprecatedProtocol1> *object); /* { dg-warning "is deprecated" } */
23 void function4 (Class4 <NonDeprecatedProtocol1> *object);
24 void function5 (Class4 <NonDeprecatedProtocol1, DeprecatedProtocol1> *object); /* { dg-warning "is deprecated" } */
28 Protocol *p1 = @protocol (DeprecatedProtocol1); /* { dg-warning "is deprecated" } */
29 Protocol *p2 = @protocol (NonDeprecatedProtocol1);