The Cocoa code generator has a bug where it can generate a local variable that conflicts with a symbol defined in the iOS SDK. Specifically, it happens when the temporary variable counter reaches the value `386` when emitting an index variable for a for-loop in `t_cocoa_generator::generate_serialize_container()`. The offending symbol is `i386` which apparently is #define'd to equal `1` somewhere in the iOS toolchain.
This test code demonstrates the problem, regardless of Thrift codegen.
Which results in the following compiler error: