1/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, October 2010. */ 2/* { dg-do compile } */ 3 4#include <objc/objc.h> 5 6@interface MyClass 7{ 8 Class isa; 9} 10+ (int) deprecatedClassMethod: (id)firstObject, ... __attribute__((sentinel)) __attribute__((deprecated)); 11- (int) deprecatedInstanceMethod: (id)firstobject, ... __attribute__((sentinel)) __attribute__((deprecated)); 12@end 13 14/* Test that deprecation warnings are produced even if the method is 15 also marked with another attribute too (this is to test the 16 processing of multiple attributes). */ 17void foo (void) 18{ 19 MyClass *object = nil; 20 21 [MyClass deprecatedClassMethod: object, nil]; /* { dg-warning "is deprecated" } */ 22 [object deprecatedInstanceMethod: object, nil]; /* { dg-warning "is deprecated" } */ 23} 24