C "block" caret character

Viewed 250

I've noticed that this declaration involving a caret (^) character is pinned on the cdecl.org site at the top:

// "cast foo into block(int, long long) returning double"
(double (^)(int , long long ))foo

Can somebody explain what is the purpose of the caret character here? Is this really a valid character in C declarations, or is this a placeholder for something?

2 Answers

The caret is part of an extension to the C language to work with blocks. Blocks are an extension to C supported by Clang and Apple’s GCC. It is not strictly conforming C (that is, not part of the core C language defined by the C standard).

Related