diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-03-31 05:48:15 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-03-31 05:55:41 -0400 |
| commit | 3ca027ca8219dbdbb6467645944c4daada037f51 (patch) | |
| tree | 786a6c4ecac9f11d3a60f3c14c1b4276a3adc8d6 /doc | |
| parent | 536c35136ab98f2f56d07937727b3c99c0e35c5c (diff) | |
| download | zig-3ca027ca8219dbdbb6467645944c4daada037f51.tar.gz zig-3ca027ca8219dbdbb6467645944c4daada037f51.zip | |
first pass at zig build system
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`,
`zig build_lib` and `zig build_exe` respectively.
* `--name` parameter is optional when it can be inferred from the
root source filename. closes #207
* `zig build` now looks for `build.zig` which interacts with
`std.build.Builder` to describe the targets, and then the zig
build system prints TODO: build these targets. See #204
* add `@bitcast` which is mainly used for pointer reinterpret
casting and make explicit casting not do pointer reinterpretation.
Closes #290
* fix debug info for byval parameters
* sort command line help options
* `std.debug.panic` supports format string printing
* add `std.mem.IncrementingAllocator`
* fix const ptr to a variable with data changing at runtime.
closes #289
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/langref.md | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/langref.md b/doc/langref.md index 7b6ba4b294..529191bf26 100644 --- a/doc/langref.md +++ b/doc/langref.md @@ -633,3 +633,10 @@ Invokes the panic handler function. By default the panic handler function calls the public `panic` function exposed in the root source file, or if there is not one specified, invokes the one provided in `std/special/panic.zig`. + +### @bitcast(comptime DestType: type, value: var) -> DestType + +Transmutes memory from one type to another without changing any bits. +The source and destination types must have the same size. This function +can be used to, for example, reinterpret a pointer, or convert a `f32` to a +`u32`. |
