In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/testsuite/: 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com> Merge from 'apple/trunk' branch on FSF servers. 2006-03-16 Fariborz Jahanian <fjahanian@apple.com> Radar 4293709 * objc.dg/proto-init-mimatch-1.m: New. * obj-c++.dg/proto-init-mimatch-1.mm: New. From-SVN: r165668
This commit is contained in:
parent
da57d1b98f
commit
2a613cffb1
|
@ -1,3 +1,13 @@
|
|||
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Merge from 'apple/trunk' branch on FSF servers.
|
||||
|
||||
2006-03-16 Fariborz Jahanian <fjahanian@apple.com>
|
||||
|
||||
Radar 4293709
|
||||
* objc.dg/proto-init-mimatch-1.m: New.
|
||||
* obj-c++.dg/proto-init-mimatch-1.mm: New.
|
||||
|
||||
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Implemented parsing @synthesize and @dynamic for
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
/* Test to warn on protocol mismatch in a variety of initializations. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
|
||||
typedef struct objc_class *Class;
|
||||
|
||||
typedef struct objc_object {
|
||||
Class isa;
|
||||
} *id;
|
||||
|
||||
@protocol NSObject
|
||||
@end
|
||||
|
||||
@interface NSObject <NSObject>
|
||||
@end
|
||||
|
||||
@protocol NSCopying
|
||||
- (void)copyWithZone;
|
||||
@end
|
||||
|
||||
@interface Foo:NSObject <NSCopying>
|
||||
@end
|
||||
|
||||
|
||||
extern id <NSObject> NSCopyObject();
|
||||
|
||||
@implementation Foo
|
||||
- (void)copyWithZone {
|
||||
Foo *copy = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
|
||||
Foo<NSObject,NSCopying> *g = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
|
||||
id<NSObject,NSCopying> h = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
}
|
||||
@end
|
|
@ -0,0 +1,35 @@
|
|||
/* Test to warn on protocol mismatch in a variety of initializations. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
|
||||
typedef struct objc_class *Class;
|
||||
|
||||
typedef struct objc_object {
|
||||
Class isa;
|
||||
} *id;
|
||||
|
||||
@protocol NSObject
|
||||
@end
|
||||
|
||||
@interface NSObject <NSObject>
|
||||
@end
|
||||
|
||||
@protocol NSCopying
|
||||
- (void)copyWithZone;
|
||||
@end
|
||||
|
||||
@interface Foo:NSObject <NSCopying>
|
||||
@end
|
||||
|
||||
|
||||
extern id <NSObject> NSCopyObject();
|
||||
|
||||
@implementation Foo
|
||||
- (void)copyWithZone {
|
||||
Foo *copy = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
|
||||
Foo<NSObject,NSCopying> *g = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
|
||||
id<NSObject,NSCopying> h = NSCopyObject(); /* { dg-warning "type \\'id <NSObject>\\' does not conform to the \\'NSCopying\\' protocol" } */
|
||||
}
|
||||
@end
|
Loading…
Reference in New Issue