diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2016-04-26 11:35:56 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2016-04-26 11:36:11 -0700 |
| commit | d1fa5692c685b804181d4658afce1e53ca74ec19 (patch) | |
| tree | 18d0c57776cdc470fa918e3e5fa18fdca80aa09d /std | |
| parent | 61e6c49bc537a1c8a8da1d8a0e777261eef74cef (diff) | |
| download | zig-d1fa5692c685b804181d4658afce1e53ca74ec19.tar.gz zig-d1fa5692c685b804181d4658afce1e53ca74ec19.zip | |
add array bounds checking in debug mode
closes #27
Diffstat (limited to 'std')
| -rw-r--r-- | std/builtin.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/std/builtin.zig b/std/builtin.zig index 1c636cca27..0a712c7755 100644 --- a/std/builtin.zig +++ b/std/builtin.zig @@ -1,6 +1,7 @@ // These functions are provided when not linking against libc because LLVM // sometimes generates code that calls them. +#debug_safety(false) export fn memset(dest: &u8, c: u8, n: isize) -> &u8 { var index : @typeof(n) = 0; while (index != n) { @@ -10,6 +11,7 @@ export fn memset(dest: &u8, c: u8, n: isize) -> &u8 { return dest; } +#debug_safety(false) export fn memcpy(noalias dest: &u8, noalias src: &const u8, n: isize) -> &u8 { var index : @typeof(n) = 0; while (index != n) { |
