Crash: empty computed include
ehaas opened this issue · comments
Evan Haas commented
#define HEADER
#include HEADER
panic: index out of bounds: index 0, len 0
/Users/ehaas/source/arocc/src/aro/Preprocessor.zig:1298:30: 0x101555d0b in reconstructIncludeString (arocc)
.loc = param_toks[0].loc,
^
/Users/ehaas/source/arocc/src/aro/Preprocessor.zig:3034:65: 0x101557a1b in findIncludeFilenameToken (arocc)
const include_str = (try pp.reconstructIncludeString(pp.top_expansion_buf.items, &trailing_toks)) orelse {
^
/Users/ehaas/source/arocc/src/aro/Preprocessor.zig:3073:57: 0x101559cc4 in findIncludeSource (arocc)
const filename_tok = try pp.findIncludeFilenameToken(first, tokenizer, .expect_nl_eof);
^
/Users/ehaas/source/arocc/src/aro/Preprocessor.zig:2890:41: 0x1014d9101 in include (arocc)
const new_source = findIncludeSource(pp, tokenizer, first, which) catch |er| switch (er) {
^