c-for-go
c-for-go copied to clipboard
Parsing broken on Xcode Tools 11.2
In latest Xcode releases and especially on macOS Catalina there is no more /usr/include dir. But with -ccincl it is possible to point c-for-go to the compile-suggested include directories.
However, latest Clang headers are failing to parse, example:
at /Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/stdint.h:
/* If we're hosted, fall back to the system's stdint.h, which might have
* additional definitions.
*/
#if __STDC_HOSTED__ && __has_include_next(<stdint.h>)
Error:
/Library/Developer/CommandLineTools/usr/lib/clang/11.0.0/include/stdint.h:31:43: unexpected '<', expected optional argument expression list or one of [&&, '!', '&', '(', ')', '*', '+', '-', '~', ++, --, _Alignof, character constant, floating-point constant, identifier, integer constant, long character constant, long string constant, sizeof, string literal] (and 1 more errors)
This is affecting me right now on Big Sur, Macbook M1. Is there anything I can do to help get this moving?
For me, adding Defines: _ANSI_SOURCE: 1
(in yml file) solves Xcode clang issues. (Additionally, stdbool.h and stdarg.h need to be created, but I think this is already mentioned in other issues).