Failure to parse arrays of anonymous structs
averne opened this issue · 3 comments
averne commented
futhark fails to parse/generate code for arrays of anonymous structs.
Originally discovered when attempting to import ffnvcodec/dynlink_loader.h
.
Minimal repro:
// test.h
// ----------------
struct Test {
struct {
int m;
} a[10];
};
# test.nim
# ----------------
import futhark
importc:
"test.h"
PMunch commented
I added a fix in the latest commit to master. I won't bump to a new version yet as I need to add some extra checks to ensure that it doesn't mess something else up. But it should work for you, so you can install Futhark from master and test.
averne commented
Hi, thank you for the quick fix. I can confirm it now successfully parses both the minimal repro and the ffnvcodec header.
PMunch commented
Just pushed a new 0.10.0 version with the improved fix