0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

ir: More changes to sentinel-terminated const arrays

* Don't add an extra slot for the sentinel. Most of the code keeps using
  the constant value from the type descriptor, let's harmonize all the
  code dealing with sentinels.

* Properly write out sentinel values when reinterpreting pointers at
  comptime.

* Allow the reading of the 0th element in a `[0:S]T` type.
This commit is contained in:
LemonBoy 2020-03-19 11:52:15 +01:00 • committed by Andrew Kelley
commit e3c92d0532
4 changed files with 44 additions and 28 deletions