This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empty - see comments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/codegen.cpp b/src/codegen.cpp | |
index 5214d49a3..23ab2a130 100644 | |
--- a/src/codegen.cpp | |
+++ b/src/codegen.cpp | |
@@ -9252,6 +9252,9 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa | |
} | |
args.append("-nostdinc"); | |
+ if (source_kind == FileExtCpp) { | |
+ args.append("-nostdinc++"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export fn entry() void { | |
comptime { | |
var aaa: ?u64 = 333; | |
var answer: u64 = undefined; | |
answer = aaa.?; | |
} | |
} | |
pub fn panic(msg: []const u8, error_return_trace: ?*@import("builtin").StackTrace) noreturn { | |
while (true) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/CMakeLists.txt b/CMakeLists.txt | |
index 27bc6a04f..f9e336295 100644 | |
--- a/CMakeLists.txt | |
+++ b/CMakeLists.txt | |
@@ -329,6 +329,9 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") | |
set(EXE_CFLAGS "${EXE_CFLAGS} /w") | |
else() | |
set(EXE_CFLAGS "${EXE_CFLAGS} -Werror -Wall -Werror=implicit-fallthrough") | |
+ set(EXE_CFLAGS "${EXE_CFLAGS} -fcolor-diagnostics") | |
+ set(EXE_CFLAGS "${EXE_CFLAGS} -Wno-error=unused-variable") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
empty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var storage_aaa: u32 = 1; | |
var storage_bbb: u32 = 2; | |
test "1" { | |
var aaa: ?*u32 = &storage_aaa; | |
var bbb: ?*u32 = &storage_bbb; | |
_ = aaa == bbb; | |
} | |
test "2" { | |
var aaa: ?*u32 = &storage_aaa; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const mem = std.mem; | |
const io = std.io; | |
const Bar = struct { | |
const Self = @This(); | |
arena: std.heap.ArenaAllocator, | |
raw_frame_reader: RawFrameReader, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
fn stringForUnsigned(comptime value: usize) []const u8 { | |
if (value == 0) return "0"; | |
const base = 10; | |
const base_digits = "0123456789"; | |
const ndigits = 1 + @floatToInt( | |
usize, | |
std.math.floor(std.math.log2(@intToFloat(f64, value)) / std.math.log2(@intToFloat(f64, base))), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const os = std.os; | |
const testing = std.testing; | |
const warn = std.debug.warn; | |
test "empty" { | |
try depTokenizer("", ""); | |
} | |
test "empty lf" { | |
try depTokenizer("\n", ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src-self-hosted/Module.zig b/src-self-hosted/Module.zig | |
index 5bdd38c69..d8a6e4f3b 100644 | |
--- a/src-self-hosted/Module.zig | |
+++ b/src-self-hosted/Module.zig | |
@@ -667,9 +667,10 @@ pub fn getAllErrorsAlloc(self: *Module) !AllErrors { | |
assert(errors.items.len == self.totalErrorCount()); | |
+ const tmp = try arena.allocator.dupe(AllErrors.Message, errors.items); | |
return AllErrors{ |