Skip to content

Instantly share code, notes, and snippets.

@czechboy0
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save czechboy0/11358741 to your computer and use it in GitHub Desktop.
Save czechboy0/11358741 to your computer and use it in GitHub Desktop.
Clang is confused in a block with no return value by @Try{}
int main(int argc, const char * argv[])
{
id (^iReturnStuff)() = ^id() {
@try{} @finally{}
//if you comment out line 4, Clang will not compile this.
//if you leave it like this, Clang will compile and run this, even though
//there's no value being returned.
//is there something special in @try{} that turns off compiler errors?
};
return 0;
}
@czechboy0
Copy link
Author

I am completely baffled by this. Can someone provide me with an explanation please? And I apologise in advance if it's something trivial that I should have known. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment