cc
cc copied to clipboard
github.com/cznic/cc has moved to modernc.org/cc
I came across this project when looking for tools to help me parse C files to auto-generate cgo bindings. Specifically, my use case is for implementing C APIs in Go...
``` $ go mod init example.com/m go: creating new go.mod: module example.com/m $ go get -u github.com/cznic/cc/v2 go: finding github.com/cznic/cc/v2 latest go: github.com/cznic/cc/[email protected]: missing github.com/cznic/cc/go.mod and .../v2/go.mod at revision a422565e8612...
I'm running into a ccgo compilation failure that is due to an absence of netinet/tcp.h absence. Adding the header file allows ccgo to complete, but when I add it the...
Hi, I would like to use _cc_ to parse data types and function definitions from header files but am running into what seems to be missing definitions that are part...
In the code ```c typedef int foo; foo (*bar)(); ``` The declaratory for `bar` incorrectly has `foo` as the type specifier in its specifier list. This causes `TypedefName()` and `IsTypedef()`...
Hi, got another missing case in [linmath.h:193:16](https://github.com/LunarG/VulkanSamples/blob/master/demos/linmath.h#L193) ``` &cc.Declarator{ · Linkage: None, · Type: float([4])[4], · DirectDeclarator: &cc.DirectDeclarator{ · · Token: linmath/linmath_impl.h:193:16: IDENTIFIER "S", · }, } panic: TODO goroutine...
Currently we have a kinda hackish/suboptimal solution which should be replaced eventually Tracking issue for c6e08ea
bypassed here: https://github.com/cznic/cc/commit/563948c33bbc4e7373939ff23637f66cc3131cd0 Updates cznic/virtual#1
```c typedef struct { int value; } a, b; // If we only would declare a here it would work! typedef struct { int value; } a, b; // If...
```c void f(int n) { char a[n]; sizeof(a); } ``` In the above: - `Type.Kind()` of `a` should be `Array`, not `Ptr`. - `Value` of `sizeof a` should be nil,...