This code:
#include <stdio.h>
int main()
{
void (^a)(void) = ^ void () { printf("test"); } ;
a();
}
Compile without warning with clang -Weverything -pedantic -std = c89 (version clang-800.0.42.1) and print test.
I could not find any information about the C standard having lambda, and also gcc has its own syntax for lambda, and it would be strange if they did this if there was a standard solution.
source
share