# stage2: avoid inferred struct in os_version_check.zig · gitcafe/zig

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

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

Visibility: public

Requested revision: 9ee67b967bd8ed2f11c24078ac16f9fd96b44a39

Requested commit: 9ee67b967bd8ed2f11c24078ac16f9fd96b44a39

Commit: 9ee67b967bd8ed2f11c24078ac16f9fd96b44a39

Tree: 8ae86c16c60b0b527ee35c332a4951ce7f16407e

Author: John Schmidt

Committer: Andrew Kelley

## Message

````
stage2: avoid inferred struct in os_version_check.zig

Before this commit, compiling an empty main with Stage 2 on macOS x86_64 results in

```
../stage2/bin/zig build-exe -ODebug -fLLVM empty_main.zig
error: sub-compilation of compiler_rt failed
    [...]/zig/stage2/lib/zig/std/special/compiler_rt/os_version_check.zig:26:10: error: TODO: Sema.zirStructInit for runtime-known struct values
```

By assigning the value to a variable we can sidestep the issue for now.

````

## Parents

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

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