/* Contributed by Nicola Pero , November 2010. */ /* { dg-do compile } */ /* Test deprecate attribute with a forward declarations of @protocol. */ #include #include __attribute__ ((deprecated)) @protocol DeprecatedProtocol1; @protocol NonDeprecatedProtocol1; void function1 (id object); /* { dg-warning "is deprecated" } */ void function2 (id object); @class Class4; void function3 (Class4 *object); /* { dg-warning "is deprecated" } */ void function4 (Class4 *object); void function5 (Class4 *object); /* { dg-warning "is deprecated" } */ int function6 (void) { Protocol *p1 = @protocol (DeprecatedProtocol1); /* { dg-warning "is deprecated" } */ Protocol *p2 = @protocol (NonDeprecatedProtocol1); return (p1 == p2); }