1 /* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010. */
2 /* { dg-options "-Wall" } */
3 /* { dg-do compile } */
5 /* Test that fast enumeration loops where the iterating variable is declared
6 but not used do not generate warnings. */
9 struct __objcFastEnumerationState
13 unsigned long *mutationsPtr;
14 unsigned long extra[5];
21 - (unsigned long)countByEnumeratingWithState: (struct __objcFastEnumerationState *)state
22 objects:(id *)stackbuf
23 count:(unsigned int)len;
25 - (Class) classEnumerator;
28 unsigned int count_objects_in_collection (id collection)
30 unsigned int count = 0;
32 /* The following line should generate no warnings even with
34 for (id object in collection)
40 unsigned int count_objects_in_collection_2 (id collection)
42 unsigned int count = 0;
45 /* The following line should generate no warnings even with
47 for (object in collection)