Just stumbled onto this and it cost me quite a few hours of
frustration. Hopefully someone else can benefit from this...
I just reported to Apple a code generation bug I discovered today in
Xcode 2.4.1 and 2.5. Under some circumstances (don't know exactly
what though),enabling optimized code generation results in incorrect
execution.
2) Note that the file "FooVoo.mm" declares as a constant an NSPoint
named "kItemLabelsOrigin" with value {20, 8}.
3) Note also that in the init method of FooVoo, an assigment from
kItemLabelsOrigin to a local variable "itemNameOrigin" is made.
Immediately after the assigment, the x and y coordinates of
itemNameOrigin are compared to the x and y coordinates of
kItemLabelsOrigin. Depending on the result, a message is logged to
the console. Then the values of kItemLabelsOrigin and itemNameOrigin
are logged to the console.
4) Build and run the project using the Release configuration (which
has Optimization level set to "Fastest, Smallest"), observing
messages logged to the console.