aboutsummaryrefslogtreecommitdiff
path: root/src/analyze.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-02-14 01:08:30 -0500
committerAndrew Kelley <superjoe30@gmail.com>2017-02-14 01:08:30 -0500
commit63d37b7cff0907cdf2361f1d61f19410fd6cc626 (patch)
tree9fb0e37d65a8cc01c6ff7fcba5a93cbed7075f6c /src/analyze.cpp
parent0931b85bd04fb671dce980728a3692de2bd496a5 (diff)
downloadzig-63d37b7cff0907cdf2361f1d61f19410fd6cc626.tar.gz
zig-63d37b7cff0907cdf2361f1d61f19410fd6cc626.zip
add runtime debug safety for dividing integer min value by -1
closes #260
Diffstat (limited to 'src/analyze.cpp')
-rw-r--r--src/analyze.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp
index 1fa3d063bb..f567502c29 100644
--- a/src/analyze.cpp
+++ b/src/analyze.cpp
@@ -3447,7 +3447,7 @@ static int64_t max_signed_val(TypeTableEntry *type_entry) {
}
}
-static int64_t min_signed_val(TypeTableEntry *type_entry) {
+int64_t min_signed_val(TypeTableEntry *type_entry) {
assert(type_entry->id == TypeTableEntryIdInt);
if (type_entry->data.integral.bit_count == 64) {
return INT64_MIN;