diff options
| author | kcbanner <kcbanner@gmail.com> | 2024-03-17 12:55:58 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-03-17 16:17:04 -0700 |
| commit | 54f6e74cda07a1153fd205afc8973665397f6cc7 (patch) | |
| tree | a65eaa88f52c46740542ea32b07841498b6e136e /lib/std/fmt/parse_float.zig | |
| parent | 95cb93944060d04ec49e9d2e21ef911ad2b09ccd (diff) | |
| download | zig-54f6e74cda07a1153fd205afc8973665397f6cc7.tar.gz zig-54f6e74cda07a1153fd205afc8973665397f6cc7.zip | |
cbe: rework StringLiteral to decide between string literal or array initializator syntax
This fixes an issue with boostrapping the compiler using MSVC. There is a CircularBuffer with
an array of length 65536 initialized to undefined, and because the undefined path of `renderValue`
was using `StringLiteral` to render this, the resulting zig2.c would fail to compile using MSVC.
The solution was to move the already-existing array initializer path (used in the non-undefined path)
into StringLiteral, and make StringLiteral aware of the total length so it could decide between which
style of initialization to use. We prefer to use string literals if we can, as this results in the least
amount of emitted C source.
Diffstat (limited to 'lib/std/fmt/parse_float.zig')
0 files changed, 0 insertions, 0 deletions
