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: stringize backslashes

ehaas opened this issue · comments

#define str(s) #s
x[str(\\)
panic: index out of bounds: index 1, len 1
/Users/ehaas/source/arocc/src/aro/text_literal.zig:226:29: 0x10819b224 in next (arocc)
        switch (self.literal[start + 1]) {
                            ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:8003:40: 0x108110868 in stringLiteral (arocc)
        while (char_literal_parser.next()) |item| switch (item) {
                                       ^
/Users/ehaas/source/arocc/src/aro/Parser.zig:7910:34: 0x1083250e0 in primaryExpr (arocc)
        => return p.stringLiteral(),
                                 ^