Vexu / arocc

A C compiler written in Zig.

Home Page:http://aro.vexu.eu/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash: generic expression value is call to non-existent function

ehaas opened this issue · comments

void foo(void) {
    _Generic(0, int: 8, long: bar(3))
}
panic: for loop over objects with non-equal lengths
/Users/ehaas/source/arocc/src/aro/Parser.zig:8609:73: 0x10a6233ee in genericSelection (arocc)
            for (p.list_buf.items[list_buf_top + 1 ..], p.decl_buf.items[decl_buf_top..]) |item, prev_tok| {
                                                                        ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:7946:54: 0x10a613a88 in primaryExpr (arocc)
        .keyword_generic => return p.genericSelection(),
                                                     ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:7278:40: 0x10a60a6ce in unExpr (arocc)
                lhs = try p.primaryExpr();
                                       ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:6716:20: 0x10a5fd5b8 in castExpr (arocc)
    return p.unExpr();
                   ^