https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103639

js-gcc at webkeks dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |

--- Comment #4 from js-gcc at webkeks dot org ---
Sure:

#import <ObjFW/ObjFW.h>

int
main()
{
        OFArray *array = [OFArray arrayWithObjects: @"a", @"b", nil];
        int someVar = 0;
        for (id object in array) {
                switch (someVar) {
                case 0:
                        OFLog(@"%@", object);
                        break;
                }
                OFLog(@"foo");
        }

        return 0;
}

Sorry, but something free-standing isn't possible as you need a collection
object. The same code should work with GNUstep by just replacing OF with NS.

Reply via email to