Without the kFooBarHeight definition it's impossible to give a good answer but I'm guessing you defined kFooBarHeight using a preprocessor definition? If so, best guess is you added a semicolon to the end. Your definition should look like this: #define kFooBarHeight 10
but you have set as: #define kFooBarHeight 10;
.
If what you have is the second definition when it replaced by the preprocessor you get:
CGRectMake(0.0f, 10;, 100.0f, 10.0f);
That's why your second example works correctly, it expands to:
CGFloat foo = 10;;
CGRectMake(0.0f, foo, 100.0f, 10.0f);
Again, this is just an educated guess, it's impossible to say without the actual definition of kFooBarHeight.