# Value: convert undefined values to 0xAA for bitwise operations · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/23062a5bed285f72e35651dd1e8b4a125b83dba0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 23062a5bed285f72e35651dd1e8b4a125b83dba0

Requested commit: 23062a5bed285f72e35651dd1e8b4a125b83dba0

Commit: 23062a5bed285f72e35651dd1e8b4a125b83dba0

Tree: ea6746763647264d62389f73768662184d32c82e

Author: mlugg

Committer: mlugg

## Message

```
Value: convert undefined values to 0xAA for bitwise operations

The operation `undefined & 0` ought to result in the value `0`, and likewise for
zeroing only some bits. `std/packed_int_array.zig` tests were failing because
this behavior was not implemented -- this issue was previously masked by faulty
bitcast logic which turned `undefined` values into `0xAA` on pointer loads.

Ideally, we would like to be able to track the undefined bits at comptime.
This is related to #19634.

```

## Parents

- [3c45a945285dff00d0eb8160342560bcb7d24cc5](https://git.cafe/gitcafe/zig/commit/3c45a945285dff00d0eb8160342560bcb7d24cc5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/23062a5bed285f72e35651dd1e8b4a125b83dba0?format=markdown)
