This can lead to problems if your block is inline and contains code that contains a series of comma separated lines, etc.
Example:
safetyCall(^void() { NSArray *foo = @[@"alice", "bob"]; };
The compiler will complain about "Expected") or "." and "Expected Identifier" or "(.).
However, if you must declare the inline block as a separate block before the macro, it will not generate an error.
Example:
void (^fooBlock)(void) = ^void() { NSArray *foo = @[@"alice", @"bob"]; } safetyCall(fooBlock);
source share