diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-01-31 15:50:38 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-01-31 15:50:38 -0500 |
| commit | 88a253c64dc148a6f09e4e872e3abbcd37fcc18a (patch) | |
| tree | 09250f1da80d3f0afb82c38e76dec9dad3969403 /src/codegen.cpp | |
| parent | b258fdb532a36f8ee9f091ac588a6189bad81acd (diff) | |
| download | zig-88a253c64dc148a6f09e4e872e3abbcd37fcc18a.tar.gz zig-88a253c64dc148a6f09e4e872e3abbcd37fcc18a.zip | |
fix crash when passing void to var args function
closes #235
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 9595fdefe9..ee8d13ca56 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -3738,6 +3738,9 @@ static void init(CodeGen *g, Buf *source_path) { g->invalid_instruction = allocate<IrInstruction>(1); g->invalid_instruction->value.type = g->builtin_types.entry_invalid; + + g->const_void_val.special = ConstValSpecialStatic; + g->const_void_val.type = g->builtin_types.entry_void; } void codegen_parseh(CodeGen *g, Buf *src_dirname, Buf *src_basename, Buf *source_code) { |
