Skip to content

Commit

Permalink
std.zig.parser fixed segfault when parsing cc for fn decl
Browse files Browse the repository at this point in the history
  • Loading branch information
Hejsil committed Apr 10, 2018
1 parent c6aa637 commit 0ba85ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/zig/parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ pub const Parser = struct {
},
Token.Id.Keyword_nakedcc, Token.Id.Keyword_stdcallcc => {
// TODO shouldn't need this cast
const fn_proto = try self.createAttachFnProto(arena, ctx.decls, undefined,
const fn_proto = try self.createAttachFnProto(arena, ctx.decls, Token(undefined),
ctx.extern_token, ctx.lib_name, (?Token)(token), (?Token)(null), (?Token)(null));
stack.append(State { .FnDef = fn_proto }) catch unreachable;
try stack.append(State { .FnProto = fn_proto });
Expand Down

2 comments on commit 0ba85ea

@andrewrk
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's another one on line 434. (I'd push but I don't want to step on your toes)

this is super exciting.

@Hejsil
Copy link
Contributor Author

@Hejsil Hejsil commented on 0ba85ea Apr 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can fix problems if you seem them. I probably wont work more on this today

Please sign in to comment.