Unhandled TODO: function-like macro with empty argument
The v4+v5 preprocessors barf when they hit the case of a function-like macro with an empty argument. This is on the latest commit (665e1fb8 at time of writing).
Panic:
struct TestStruct {
panic: cpp.go:987:subst
TODO
goroutine 1 [running]:
modernc.org/cc/v4.(*cpp).subst(0xc00013c0f0?, 0xc5?, 0xc00020c6e0, {0xc00017e348, 0x2, 0x3}, {0xc00012c140?, 0x1, 0x9?}, {0x0, ...}, ...)
/src/vendor/modernc.org/cc/v4/cpp.go:987 +0x13f4
modernc.org/cc/v4.(*cpp).expand(0xc000200000, 0x1, 0x0, {0x565420?, 0xc00013c0f0?}, 0xc00012e120)
/src/vendor/modernc.org/cc/v4/cpp.go:890 +0xca7
modernc.org/cc/v4.(*tokenizer).token(0xc00012e100)
/src/vendor/modernc.org/cc/v4/cpp.go:642 +0x4b
modernc.org/cc/v4.(*cpp).rune(0xc000200000)
/src/vendor/modernc.org/cc/v4/cpp.go:782 +0x4f
modernc.org/cc/v4.preprocess(0xc000200000, {0x564d58, 0xc000012018})
/src/vendor/modernc.org/cc/v4/cc.go:654 +0xc6
modernc.org/cc/v4.Preprocess(0xc000114200?, {0xc000142240, 0x2, 0x2}, {0x564d58, 0xc000012018})
/src/vendor/modernc.org/cc/v4/cc.go:646 +0x90
main.main()
/src/cmd/h2inc5/main.go:91 +0x28e
Process finished with the exit code 2
Code to reproduce:
#define STRUCT_MEMBERS_PREFIXED(prefix) \
void *prefix##member;
struct TestStruct {
STRUCT_MEMBERS_PREFIXED()
};