(updated) llvm-gcc strange behavior
Today compiling with XCode 4.2.1 ... i found this..
the syntax is right... ¿have the switch instruction a limitation about this? YES
ARM and x86 architecture supports 'nop' instruction...
In Switch-Case statement, you can't declare variables inside, the 'cases' are translated to jump to memory address (some bytes after normally) in case of jump, the stack is not re-framed, like a simple "goto" basic instruction ("jmp" in asembler) is used to go to the correct memory address, when this instruction ends, the stack is returned "as is", with some bytes more of allocations in them, causing unexpected BAD_ACCESS & other low level errors.
Never allocate in switch case ;-) "learn from mistakes"
Posted at BinaryCell