aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/attributes/class-attribute-2.mm
blob: 35015c0370a809461f2a479723e217edc8d3a9d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */

#include <objc/objc.h>

__attribute__ ((deprecated)) 
@interface DeprecatedClass
{
  Class isa;
}
+ (id) new;
@end

__attribute__ ((deprecated))
@implementation DeprecatedClass /* { dg-warning "prefix attributes are ignored" } */
+ (id) new { return nil; }
@end

void function (void)
{
  DeprecatedClass *object = [DeprecatedClass new]; /* { dg-warning "is deprecated" } */ 
}