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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [proto-init-mimatch-1.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test to warn on protocol mismatch in a variety of initializations. */
2
 
3
/* { dg-do compile } */
4
 
5
typedef struct objc_class *Class;
6
 
7
typedef struct objc_object {
8
        Class isa;
9
} *id;
10
 
11
@protocol NSObject
12
@end
13
 
14
@interface NSObject 
15
@end
16
 
17
@protocol NSCopying
18
- (void)copyWithZone;
19
@end
20
 
21
@interface Foo:NSObject 
22
@end
23
 
24
 
25
extern id  NSCopyObject();
26
 
27
@implementation Foo
28
- (void)copyWithZone {
29
    Foo *copy = NSCopyObject(); /* { dg-warning "type \\'id \\' does not conform to the \\'NSCopying\\' protocol" } */
30
 
31
    Foo *g = NSCopyObject(); /* { dg-warning "type \\'id \\' does not conform to the \\'NSCopying\\' protocol" } */
32
 
33
    id h = NSCopyObject(); /* { dg-warning "type \\'id \\' does not conform to the \\'NSCopying\\' protocol" } */
34
}
35
@end

powered by: WebSVN 2.1.0

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