blob: 5eeefb6d95df9a60189fdbd9ccc75615ac3b11bc [file] [log] [blame]
/* APPLE LOCAL file radar 4538105 */
/* The new foreach generates a spurious warning if the key is not used, but
the loop is instead being utilized for a side effect. */
/* { dg-options "-Wno-objc-root-class -mmacosx-version-min=10.5 -Wall" { target powerpc*-*-darwin* i?86*-*-darwin* } } */
/* { dg-options "-Wno-objc-root-class -Wall" { target arm*-*-darwin* } } */
/* { dg-do compile } */
typedef struct objc_class *Class;
typedef struct objc_object {
Class isa;
} *id;
@interface MyList
@end
@implementation MyList
- (unsigned int)countByEnumeratingWithState:
(struct __objcFastEnumerationState *)state objects:
(id *)items count:(unsigned int)stackcount
{
return 0;
}
@end
@interface MyList (BasicTest)
- (void)compilerTestAgainst;
@end
@implementation MyList (BasicTest)
- (void)compilerTestAgainst {
int i=0;
for (id elem in self)
++i;
}
@end