# move "unreachable code" error from stage1 to stage2 · gitcafe/zig

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

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

Visibility: public

Requested revision: 125b85d7375b96b4847f6ead51c853cdc0567506

Requested commit: 125b85d7375b96b4847f6ead51c853cdc0567506

Commit: 125b85d7375b96b4847f6ead51c853cdc0567506

Tree: 34a947e48f84ce6455d3ff133828a8e0e5614ce8

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

````
move "unreachable code" error from stage1 to stage2

 * AstGen: implement "unreachable code" error for blocks. This works at
   the statement level.
 * stage1: remove the "unreachable code" error implementation, which
   means removing the `is_gen` field from IrInstSrc. This is one small
   step towards a smaller memory footprint for stage1. The benefits
   won't be realized until a future commit because this flag took
   advantage of padding.

There may be a regression here with "union has no associated enum"
error, and there is a regression with the following code:

```zig
const a = noreturn;
```

A future commit will address these regressions.

````

## Parents

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

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