Search code examples
iphoneobjective-cxcode4xcode4.2

XCODE 4 to 4.2 differences when calculate etc


After migrating from XCODE 4 to 4.2 i have quite a few problems with my applications, many of them due to my own bad code quality.

As an example i had for some reason done two calculations looking like:

xx = xx++

...which worked in XCODE 4 but not in 4.2 where the compiler jumped over and did not either process or warned about it. This took me a week to find&fix even if i tried to read-up on the differences between 4 and 4.2.

Changed it to:

xx++

..so it works now :-)

However, i still have problems so i wonder if someone could point me to where i can read about these type of "smaller but important" differences, which hopefully can help me track the other issues down.

Cheers


Solution

  • Welcome to the wonderful world of undefined behaviour. These sorts of changes are not often documented, because they only occur when you break your contract with the compiler.

    See this question (it is related to C++, but there are a lot of common undefined behaviours between C++ and Objective-C) for some more examples.