Closed yurivict closed 5 months ago
Local functions are a gcc extension. clang has an option for block. With some macrology, you could generate either a local function or a block, but this has invasive implications, since pointers to functions must be converted to pointers to blocks, and pointers to blocks cannot point to functions. In gcc, a pointer to a function can point to a global or local function. It's probably not worth it.
So rewrite it using global functions, and yes, it means that any free variable must be moved as a global variable too, that must be assigned before calling the function.
Or stay with gcc until clang implements the same extension.
Ok, thanks for this explanation.
Build prints this error:
Build seems to tolerate these types of errors and succeeds, but the errors shouldn't occur.
Version: 3.70 FreeBSD 14.0