OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [attributes/] [proto-attribute-3.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Contributed by Nicola Pero , November 2010.  */
2
/* { dg-do compile } */
3
/* { dg-skip-if "No API#2 pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
4
 
5
 
6
/* Test deprecate attribute with normal @protocol declarations.  */
7
 
8
 
9
#include 
10
#include 
11
#include 
12
 
13
__attribute__ ((deprecated))
14
@protocol DeprecatedProtocol1
15
- (void) aMethod;
16
@end
17
 
18
@protocol NonDeprecatedProtocol1
19
- (void) anotherMethod;
20
@end
21
 
22
@protocol Protocol2  /* { dg-warning "is deprecated" } */
23
- (void) someOtherMethod;
24
@end
25
 
26
@protocol Protocol3 
27
- (void) someOtherMethod2;
28
@end
29
 
30
@protocol Protocol4  /* { dg-warning "is deprecated" } */
31
- (void) someOtherMethod3;
32
@end
33
 
34
 
35
@interface Class1  /* { dg-warning "is deprecated" } */
36
@end
37
 
38
@interface Class2 
39
@end
40
 
41
@interface Class3  /* { dg-warning "is deprecated" } */
42
@end
43
 
44
@interface Class2 (Category1)  /* { dg-warning "is deprecated" } */
45
@end
46
 
47
void function1 (id  object); /* { dg-warning "is deprecated" } */
48
void function2 (id  object);
49
 
50
@class Class4;
51
 
52
void function3 (Class4  *object); /* { dg-warning "is deprecated" } */
53
void function4 (Class4  *object);
54
void function5 (Class4  *object); /* { dg-warning "is deprecated" } */
55
 
56
int function6 (void)
57
{
58
  Protocol *p1 = @protocol (DeprecatedProtocol1); /* { dg-warning "is deprecated" } */
59
  Protocol *p2 = @protocol (NonDeprecatedProtocol1);
60
 
61
  return (p1 == p2);
62
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.